Free cookie consent management tool by TermsFeed Policy Generator

source: branches/3133_ProblemModifiers/HeuristicLab.Problems.Modifiers/ListExtensions.cs @ 18065

Last change on this file since 18065 was 18029, checked in by bwerth, 3 years ago

#3133 added implementation of problem modifiers

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.