Click or drag to resize
AlgorithmsGetReverseComparerT Method
Reverses the order of comparison of an IComparer<T>. The resulting comparer can be used, for example, to sort a collection in descending order. Equality and hash codes are unchanged.

Namespace: X3Platform.Collections
Assembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntax
public static IComparer<T> GetReverseComparer<T>(
	IComparer<T> comparer
)

Parameters

comparer
Type: System.Collections.GenericIComparerT
The comparer to reverse.

Type Parameters

T
The type of items thta are being compared.

Return Value

Type: IComparerT
An IComparer<T> that compares items in the reverse order of comparer.
Exceptions
ExceptionCondition
ArgumentNullExceptioncomparer is null.
See Also