Click or drag to resize
ListTSort Method (ComparisonT)
Sorts the elements in the entire ListT using the specified ComparisonT.

Namespace: System.Collections.Generic
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public void Sort(
	Comparison<T> comparison
)

Parameters

comparison
Type: SystemComparisonT
The ComparisonT to use when comparing elements.
Exceptions
ExceptionCondition
ArgumentNullExceptioncomparison is null.
ArgumentExceptionThe implementation of comparison caused an error during the sort. For example, comparison might not return 0 when comparing an item with itself.
See Also