Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Method: CustomComparer<T> ThenBy<TBy>(Func<T, TBy>, IComparer<TBy>)

Declaration

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

Summary

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.

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.