Sort()

List::Sort(const SharedPtr<System::Collections::Generic::IComparer<T>>&) method

Sorts elements in the list.

void System::Collections::Generic::List<T>::Sort(const SharedPtr<System::Collections::Generic::IComparer<T>> &comparator)

Arguments

ParameterTypeDescription
comparatorconst SharedPtr<System::Collections::Generic::IComparer<T>>&Comparator to use.

List::Sort() method

Sorts elements in the list using default comparator.

void System::Collections::Generic::List<T>::Sort()

List::Sort(int, int, SharedPtr<System::Collections::Generic::IComparer<T>>) method

Sorts elements in the list slice.

void System::Collections::Generic::List<T>::Sort(int index, int count, SharedPtr<System::Collections::Generic::IComparer<T>> comparator)

Arguments

ParameterTypeDescription
indexintSlice beginning index.
countintSlice size.
comparatorSharedPtr<System::Collections::Generic::IComparer<T>>Comparator to use.

List::Sort(Comparison<T>, bool) method

Sorts elements in the list.

void System::Collections::Generic::List<T>::Sort(Comparison<T> comparison, bool)

Arguments

ParameterTypeDescription
comparisonComparison<T>Comparison to use.

See Also