Free cookie consent management tool by TermsFeed Policy Generator

source: addons/HeuristicLab.FitnessLandscapeAnalysis/HeuristicLab.Analysis.FitnessLandscape/ListExtensions.cs @ 18207

Last change on this file since 18207 was 16995, checked in by gkronber, 5 years ago

#2520 Update plugin dependencies and references for HL.FLA for new persistence

File size: 320 bytes
Line 
1using System.Collections.Generic;
2
3namespace HeuristicLab.Analysis.FitnessLandscape {
4  public static class ListExtensions {
5    public static void DuplicateLast<T>(this IList<T> l) {
6      l.Add(l[l.Count-1]);
7    }
8    public static T Last<T>(this IList<T> l) {
9      return l[l.Count - 1];
10    }
11  }
12}
Note: See TracBrowser for help on using the repository browser.