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)
パラメーター説明
TKeykeys 配列の要素の型
TValueitems 配列の要素の型
パラメーター説明
keysconst ArrayPtr<TKey>&Array にキー値が含まれています
itemsconst ArrayPtr<TValue>&Arraykeys 配列のキー値にマップされたアイテムが含まれています

参照

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)
パラメーター説明
TKeykeys 配列の要素の型
TValueitems 配列の要素の型
パラメーター説明
keysconst ArrayPtr<TKey>&Array にキー値が含まれています
itemsconst ArrayPtr<TValue>&Arraykeys 配列のキー値にマップされたアイテムが含まれています
インデックスintソートする範囲の開始位置を示すインデックス
lengthintソートする範囲内の要素数

参照

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ソートする要素範囲のサイズ

参照