Summary
Encapsulates an IComparer<T> that uses a comparison function provided as a delegate.
Generic type parameters
T |
The type of elements to be compared. |
Constructors
Static methods
CustomComparer<T> | By(Func<T, string> selector, bool ignoreCase) |
Creates and returns a CustomComparer which compares items by comparing the results of a selector function. |
CustomComparer<T> | By<TBy>(Func<T, TBy> selector, IComparer<TBy> comparer = null) |
CustomComparer<T> | By<TBy>(Func<T, TBy> selector, Comparison<TBy> comparison) |
Instance methods
int | |
Compares two elements. |
CustomComparer<T> | ThenBy(Func<T, string> selector, bool ignoreCase) |
Creates and returns a CustomComparer which uses the current comparer first, and if the current comparer says
the items are equal, further compares items by comparing the results of a string selector function. |
CustomComparer<T> | ThenBy<TBy>(Func<T, TBy> selector, IComparer<TBy> comparer = null) |
Creates and returns a CustomComparer which uses the current comparer first, and if the current comparer says
the items are equal, further compares items by comparing the results of a selector function. |
CustomComparer<T> | ThenBy<TBy>(Func<T, TBy> selector, Comparison<TBy> comparison) |