System::Collections::Generic::List::Sort method

List::Sort() method

Sorts elements in the list using default comparator.

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

See Also

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

Sorts elements in the list.

void System::Collections::Generic::List<T>::Sort(Comparison<T> comparison, bool)
ParameterTypeDescription
comparisonComparison<T>Comparison to use.

See Also

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)
ParameterTypeDescription
comparatorconst SharedPtr<System::Collections::Generic::IComparer<T>>&Comparator to use.

See Also

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)
ParameterTypeDescription
indexintSlice beginning index.
countintSlice size.
comparatorSharedPtr<System::Collections::Generic::IComparer<T>>Comparator to use.

See Also