Method Sort
Sort()
Sorts the items in the entire list using the default comparer.
Declaration
public void Sort()
Sort(Comparison<TValue>)
Sorts the items in the entire list using the specified comparison.
Declaration
public void Sort(Comparison<TValue> comparison)
Parameters
Type | Name | Description |
---|---|---|
Comparison<TValue> | comparison |
Sort(IComparer<TValue>?)
Sorts the items in the entire list using the specified comparer.
Declaration
public void Sort(IComparer<TValue>? comparer)
Parameters
Type | Name | Description |
---|---|---|
IComparer<TValue> | comparer |
Sort(int, int, IComparer<TValue>?)
Sorts the items in a range of items in System.Collections.Generic.List`1 using the specified comparer.
Declaration
public void Sort(int index, int count, IComparer<TValue>? comparer)
Parameters
Type | Name | Description |
---|---|---|
int | index | The zero-based starting index of the range to sort. |
int | count | The length of the range to sort. |
IComparer<TValue> | comparer | The comparer implementation to use when comparing items, or null to use the default comparer. |