public static void QuickSort(this IList self, Func <object, object, bool> compareFunc) { SortUtil.QuickSort(self, compareFunc); }
public static void QuickSortWithCompareRules(this IList self, IList <Comparison <object> > compareRules) { SortUtil.QuickSortWithCompareRules(self, compareRules); }
public static void BubbleSort(this IList self, Func <object, object, bool> compareFunc) { SortUtil.BubbleSort(self, compareFunc); }
public static void QuickSortWithCompareRules <T>(this IList <T> self, IList <Comparison <T> > compareRules) { SortUtil.QuickSortWithCompareRules(self, compareRules); }
//如:list.QuickSort((a, b)=>return a.count <= b.count) //则是将count由小到大排序,注意比较大小时不要漏掉等于号,否则相等时也进行排序,则排序不稳定 public static void QuickSort <T>(this IList <T> self, Func <T, T, bool> compareFunc) { SortUtil.QuickSort(self, compareFunc); }
public static void SortWithCompareRules <T>(this List <T> self, IList <Comparison <T> > compareRules) { SortUtil.MergeSortWithCompareRules(self, compareRules); }