Sorts the elements in a section of a one-dimensional Array, using the IComparable interface implemented by each element of the Array.
[Visual Basic] Overloads Public Shared Sub Sort( _ ByVal array As Array, _ ByVal index As Integer, _ ByVal length As Integer _ ) [C#] public static void Sort( Array array, int index, int length ); [C++] public: static void Sort( Array* array, int index, int length ); [JScript] public static function Sort( array : Array, index : int, length : int );
None.
Exception Type | Condition |
---|---|
ArgumentNullException | array is a null reference (in Visual Basic Nothing). |
RankException | array is multidimensional. |
ArgumentOutOfRangeException | index is less than the lower bound of array.
-or- length is less than zero. |
ArgumentException | index and length do not denote a valid range in array. |
Each element within the specified section of array must implement the IComparable interface to be capable of comparisons with every other element in array.
Array Class | Array Members | System Namespace | Array.Sort Overload List | IComparable | BinarySearch