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]; } }
public static ICustomList <T> Sort <T>(ICustomList <T> customList) where T : IComparable <T> { return(new CustomList <T>(customList.OrderBy(x => x))); }