System::Array::Sort method

Array::Sort(const ArrayPtr<Type>&) method

Sorts elements in the specified array using default comparer.

template<typename Type> static void System::Array<T>::Sort(const ArrayPtr<Type> &arr)
ParameterTypeDescription
arrconst ArrayPtr<Type>&Targed array

See Also

Array::Sort(const ArrayPtr<Type>&, int, int) method

Sorts a range of elements in the specified array using default comparer.

template<typename Type> static void System::Array<T>::Sort(const ArrayPtr<Type> &arr, int startIndex, int count)
ParameterTypeDescription
arrconst ArrayPtr<Type>&Targed array
startIndexintThe index designating the beginning of the range of elements to sort
countintThe size of the range of elements to sort

See Also

Array::Sort(const ArrayPtr<Type>&, const SharedPtr<System::Collections::Generic::IComparer<T>>&) method

Sorts elements in the specified array using specified comparer.

template<typename Type> static void System::Array<T>::Sort(const ArrayPtr<Type> &arr, const SharedPtr<System::Collections::Generic::IComparer<T>> &comparator)
ParameterTypeDescription
arrconst ArrayPtr<Type>&Targed array
comparatorconst SharedPtr<System::Collections::Generic::IComparer<T>>&IComparer object used to compare elements of the array

See Also

Array::Sort(const ArrayPtr<Type>&, const SharedPtr<System::Collections::Generic::IComparer<Y>>&) method

NOT IMPLEMENTED.

template<typename Type,typename Y> static void System::Array<T>::Sort(const ArrayPtr<Type> &arr, const SharedPtr<System::Collections::Generic::IComparer<Y>> &comparator)

See Also

Array::Sort(const ArrayPtr<TKey>&, const ArrayPtr<TValue>&) method

Sorts two arrays one containing keys and the other - corresponding items, based on the values of array containing keys, elements of which are compared using operator<.

template<typename TKey,typename TValue> static void System::Array<T>::Sort(const ArrayPtr<TKey> &keys, const ArrayPtr<TValue> &items)
ParameterDescription
TKeyThe type of the elements in the keys array
TValuethe type of the elements in the items array
ParameterTypeDescription
keysconst ArrayPtr<TKey>&Array that contains key values
itemsconst ArrayPtr<TValue>&Array that contains items that are mapped to the key values in keys array

See Also

Array::Sort(const ArrayPtr<TKey>&, const ArrayPtr<TValue>&, int, int) method

Sorts two arrays one containing keys and the other - corresponding items, based on the values of array containing keys, elements of which are compared using default comparer.

template<typename TKey,typename TValue> static void System::Array<T>::Sort(const ArrayPtr<TKey> &keys, const ArrayPtr<TValue> &items, int index, int length)
ParameterDescription
TKeyThe type of the elements in the keys array
TValuethe type of the elements in the items array
ParameterTypeDescription
keysconst ArrayPtr<TKey>&Array that contains key values
itemsconst ArrayPtr<TValue>&Array that contains items that are mapped to the key values in keys array
indexintThe index designating the beginning of the range to sort
lengthintThe number of elements in the range to sort

See Also