C5  2.4
The C5 Generic Collection Library for C# and CLI is a comprehensive collection library supporting lists, sets, bags, dictionaries, priority queues, (FIFO) queues, and (LIFO) stacks. C5 runs on .NET 3.5+, Silverlight 5, Windows Phone 8, Xamarin.iOS, Xamarin.Android, and Mono.
C5.ComparerFactory< T > Class Template Reference

Factory class to create comparers and equality comparers using Func delegates More...

Static Public Member Functions

static IComparer< T > CreateComparer (Func< T, T, int > comparer)
 Create a new comparer. More...
 
static IEqualityComparer< T > CreateEqualityComparer (Func< T, T, bool > equals, Func< T, int > getHashCode)
 Creates a new equality comparer. More...
 

Detailed Description

Factory class to create comparers and equality comparers using Func delegates

Template Parameters
TThe type to compare

Member Function Documentation

static IComparer<T> C5.ComparerFactory< T >.CreateComparer ( Func< T, T, int >  comparer)
static

Create a new comparer.

Parameters
comparerThe compare function.
Returns
The comparer
static IEqualityComparer<T> C5.ComparerFactory< T >.CreateEqualityComparer ( Func< T, T, bool >  equals,
Func< T, int >  getHashCode 
)
static

Creates a new equality comparer.

Parameters
equalsThe equals function.
getHashCodeThe getHashCode function.
Returns
The equality comparer.

The documentation for this class was generated from the following file: