예제 #1
0
        public static void Sort <T>(ICustomList <T> inputList)
            where T : IComparable <T>
        {
            var sorted = inputList.OrderBy(e => e).ToList();

            for (var i = 0; i < sorted.Count; i++)
            {
                inputList[i] = sorted[i];
            }
        }
예제 #2
0
 public static ICustomList <T> Sort <T>(ICustomList <T> customList)
     where T : IComparable <T>
 {
     return(new CustomList <T>(customList.OrderBy(x => x)));
 }