Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 17236 was 16995, checked in by gkronber, 6 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.