Метод System::Array::Sort

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

Сортирует два массива: один, содержащий ключи, а другой — соответствующие элементы, основываясь на значениях массива, содержащего ключи, элементы которого сравниваются с помощью operator<.

template<typename TKey,typename TValue> static void System::Array<T>::Sort(const ArrayPtr<TKey> &keys, const ArrayPtr<TValue> &items)
ПараметрОписание
TKeyТип элементов в массиве keys
TValueтип элементов в массиве items
ПараметрТипОписание
keysconst ArrayPtr<TKey>&Array содержащий значения ключей
itemsconst ArrayPtr<TValue>&Array содержащий элементы, сопоставленные со значениями ключей в массиве keys

См. также

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

Сортирует два массива: один, содержащий ключи, а другой — соответствующие элементы, основываясь на значениях массива, содержащего ключи, элементы которого сравниваются с помощью сравнивателя по умолчанию.

template<typename TKey,typename TValue> static void System::Array<T>::Sort(const ArrayPtr<TKey> &keys, const ArrayPtr<TValue> &items, int index, int length)
ПараметрОписание
TKeyТип элементов в массиве keys
TValueтип элементов в массиве items
ПараметрТипОписание
keysconst ArrayPtr<TKey>&Array содержащий значения ключей
itemsconst ArrayPtr<TValue>&Array содержащий элементы, сопоставленные со значениями ключей в массиве keys
индексintИндекс, указывающий начало диапазона для сортировки
длинаintКоличество элементов в диапазоне для сортировки

См. также

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

Сортирует элементы в указанном массиве, используя сравниватель по умолчанию.

template<typename Type> static void System::Array<T>::Sort(const ArrayPtr<Type> &arr)
ПараметрТипОписание
arrconst ArrayPtr<Type>&Целевой массив

См. также

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

Сортирует элементы в указанном массиве, используя указанный сравниватель.

template<typename Type> static void System::Array<T>::Sort(const ArrayPtr<Type> &arr, const SharedPtr<System::Collections::Generic::IComparer<T>> &comparator)
ПараметрТипОписание
arrconst ArrayPtr<Type>&Целевой массив
компараторconst SharedPtr<System::Collections::Generic::IComparer<T>>&Объект IComparer, используемый для сравнения элементов массива

См. также

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

НЕ РЕАЛИЗОВАНО.

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

См. также

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

Сортирует диапазон элементов в указанном массиве, используя сравниватель по умолчанию.

template<typename Type> static void System::Array<T>::Sort(const ArrayPtr<Type> &arr, int startIndex, int count)
ПараметрТипОписание
arrconst ArrayPtr<Type>&Целевой массив
startIndexintИндекс, обозначающий начало диапазона элементов для сортировки
countintРазмер диапазона элементов для сортировки

См. также