示例#1
0
	  /// <summary>
	  /// Sort an ArrayList using the specified comparer
	  /// </summary>
	  /// <param name="array">ArrayList to sort</param>
	  /// <param name="compare">Comparer to used for sorting</param>
	  public static void Sort(ref System.Collections.ArrayList array, System.Collections.IComparer compare)
	  {
		  using (MergeSort mergeSort = new MergeSort())
		  {
			  mergeSort.InternalSort(ref array, 0, array.Count - 1, compare);
		  }
	  }
示例#2
0
	  /// <summary>
	  /// Sort an array using the default comparer
	  /// </summary>
	  /// <param name="array">array to be sorted</param>
	  public static void Sort(ref Array array)
	  {
		  using (MergeSort mergeSort = new MergeSort())
		  {
			  mergeSort.InternalSort(ref array, 0, array.Length - 1, System.Collections.Comparer.Default);
		  }
	  }