source:
branches/3133_ProblemModifiers/HeuristicLab.Problems.Modifiers/ListExtensions.cs
@
18029
Last change on this file since 18029 was 18029, checked in by bwerth, 3 years ago | |
---|---|
File size: 320 bytes |
Line | |
---|---|
1 | using System.Collections.Generic; |
2 | |
3 | namespace 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.