ListTSort Method (ComparisonT) |
Sorts the elements in the entire
ListT using the specified
ComparisonT.
Namespace: System.Collections.GenericAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public void Sort(
Comparison<T> comparison
)
Parameters
- comparison
- Type: SystemComparisonT
The ComparisonT to use when comparing elements.
Exceptions Exception | Condition |
---|
ArgumentNullException | comparison is null. |
ArgumentException | The implementation of comparison caused an error during the sort. For example, comparison might not return 0 when comparing an item with itself. |
See Also