InternalSort() protected method

The actual implementation
protected InternalSort ( Array &primary, int left, int right, System compare ) : void
primary System.Array
left int
right int
compare System
return void
Ejemplo n.º 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);
			}
		}
Ejemplo n.º 2
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);
     }
 }
Ejemplo n.º 3
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);
			}
		}
Ejemplo n.º 4
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);
     }
 }