Skip to main content
.NET Framework Class Library
Array..::.Sort Method





Sorts the elements in one-dimensional Array objects.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Overload List
 NameDescription
Public methodStatic memberSort<(Of <(T>)>)(array<T>[]()[])Sorts the elements in an entire Array using the IComparable<(Of <(T>)>) generic interface implementation of each element of the Array.
Public methodStatic memberSort(Array)Sorts the elements in an entire one-dimensional Array using the IComparable implementation of each element of the Array.
Public methodStatic memberSort<(Of <(T>)>)(array<T>[]()[], IComparer<(Of <(T>)>))Sorts the elements in an Array using the specified IComparer<(Of <(T>)>) generic interface.
Public methodStatic memberSort<(Of <(T>)>)(array<T>[]()[], Comparison<(Of <(T>)>))Sorts the elements in an Array using the specified Comparison<(Of <(T>)>).
Public methodStatic memberSort<(Of <(TKey, TValue>)>)(array<TKey>[]()[], array<TValue>[]()[])Sorts a pair of Array objects (one contains the keys and the other contains the corresponding items) based on the keys in the first Array using the IComparable<(Of <(T>)>) generic interface implementation of each key.
Public methodStatic memberSort(Array, Array)Sorts a pair of one-dimensional Array objects (one contains the keys and the other contains the corresponding items) based on the keys in the first Array using the IComparable implementation of each key.
Public methodStatic memberSort(Array, IComparer)Sorts the elements in a one-dimensional Array using the specified IComparer.
Public methodStatic memberSort<(Of <(T>)>)(array<T>[]()[], Int32, Int32)Sorts the elements in a range of elements in an Array using the IComparable<(Of <(T>)>) generic interface implementation of each element of the Array.
Public methodStatic memberSort<(Of <(TKey, TValue>)>)(array<TKey>[]()[], array<TValue>[]()[], IComparer<(Of <(TKey>)>))Sorts a pair of Array objects (one contains the keys and the other contains the corresponding items) based on the keys in the first Array using the specified IComparer<(Of <(T>)>) generic interface.
Public methodStatic memberSort(Array, Array, IComparer)Sorts a pair of one-dimensional Array objects (one contains the keys and the other contains the corresponding items) based on the keys in the first Array using the specified IComparer.
Public methodStatic memberSort(Array, Int32, Int32)Sorts the elements in a range of elements in a one-dimensional Array using the IComparable implementation of each element of the Array.
Public methodStatic memberSort<(Of <(T>)>)(array<T>[]()[], Int32, Int32, IComparer<(Of <(T>)>))Sorts the elements in a range of elements in an Array using the specified IComparer<(Of <(T>)>) generic interface.
Public methodStatic memberSort<(Of <(TKey, TValue>)>)(array<TKey>[]()[], array<TValue>[]()[], Int32, Int32)Sorts a range of elements in a pair of Array objects (one contains the keys and the other contains the corresponding items) based on the keys in the first Array using the IComparable<(Of <(T>)>) generic interface implementation of each key.
Public methodStatic memberSort(Array, Array, Int32, Int32)Sorts a range of elements in a pair of one-dimensional Array objects (one contains the keys and the other contains the corresponding items) based on the keys in the first Array using the IComparable implementation of each key.
Public methodStatic memberSort(Array, Int32, Int32, IComparer)Sorts the elements in a range of elements in a one-dimensional Array using the specified IComparer.
Public methodStatic memberSort<(Of <(TKey, TValue>)>)(array<TKey>[]()[], array<TValue>[]()[], Int32, Int32, IComparer<(Of <(TKey>)>))Sorts a range of elements in a pair of Array objects (one contains the keys and the other contains the corresponding items) based on the keys in the first Array using the specified IComparer<(Of <(T>)>) generic interface.
Public methodStatic memberSort(Array, Array, Int32, Int32, IComparer)Sorts a range of elements in a pair of one-dimensional Array objects (one contains the keys and the other contains the corresponding items) based on the keys in the first Array using the specified IComparer.
Top
Microsoft is conducting an online survey to understand your opinion of the MSDN Web site. If you choose to participate, the online survey will be presented to you when you leave the MSDN Web site.

Would you like to participate?