Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Static method: CustomComparer<T> By<TBy>(Func<T, TBy>, IComparer<TBy>)

Declaration

public static CustomComparer<T> By<TBy>(
    Func<T, TBy> selector,
    IComparer<TBy> comparer = null
)

Summary

Creates and returns a CustomComparer which compares items by comparing the results of a selector function.

Generic type parameters

TByThis type parameter is not documented.

Parameters

Func<T, TBy>selector Function selecting the actual value to be compared.
IComparer<TBy>comparer Comparer to use for comparing the results of the selector function. If null, the default comparer is used; this comparer will use the IComparable interface if implemented.