Click or drag to resize

XComparer Methods

The XComparer type exposes the following members.

Methods
  NameDescription
Public methodStatic memberByT, TKey
Creates a comparer with ascending order based on the specified comparison key and key comparer.
Public methodStatic memberByDescendingT, TKey
Creates a comparer with descending order based on the specified comparison key and key comparer.
Public methodStatic memberChainWithT
Chains two comparers. The resulting comparer will first compare items using comparer, and if it's not enough to decide which is greater, it will use nextComparer to decide.
Public methodStatic memberFromComparisonT
Public methodStatic memberMaxT
Returns the greater of two items according to comparer.
Public methodStatic memberMinT
Returns the lesser of two items according to comparer.
Public methodStatic memberReverseT
Returns a comparer that has the reverse logic of the original comparer.
Public methodStatic memberThenByT, TKey
Chains a secondary comparer with ascending order based on the specified key to an existing comparer.
Public methodStatic memberThenByDescendingT, TKey
Chains a secondary comparer with descending order based on the specified key to an existing comparer.
Top
See Also