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.CollectionsAssembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntaxpublic static IComparer<T> GetReverseComparer<T>(
IComparer<T> comparer
)
public:
generic<typename T>
static IComparer<T>^ GetReverseComparer(
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:
IComparerTAn IComparer<T> that compares items in the reverse order of
comparer.
Exceptions
See Also