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.KeyValuePairEqualityComparer< K, V > Class Template Reference

Default equalityComparer for dictionary entries. Operations only look at keys and uses an externally defined equalityComparer for that. More...

Inheritance diagram for C5.KeyValuePairEqualityComparer< K, V >:

Public Member Functions

 KeyValuePairEqualityComparer ()
 Create an entry equalityComparer using the default equalityComparer for keys More...
 
 KeyValuePairEqualityComparer (SCG.IEqualityComparer< K > keyequalityComparer)
 Create an entry equalityComparer from a specified item equalityComparer for the keys More...
 
int GetHashCode (KeyValuePair< K, V > entry)
 Get the hash code of the entry More...
 
bool Equals (KeyValuePair< K, V > entry1, KeyValuePair< K, V > entry2)
 Test two entries for equality More...
 

Detailed Description

Default equalityComparer for dictionary entries. Operations only look at keys and uses an externally defined equalityComparer for that.

Constructor & Destructor Documentation

Create an entry equalityComparer using the default equalityComparer for keys

C5.KeyValuePairEqualityComparer< K, V >.KeyValuePairEqualityComparer ( SCG.IEqualityComparer< K >  keyequalityComparer)

Create an entry equalityComparer from a specified item equalityComparer for the keys

Parameters
keyequalityComparerThe key equalitySCG.Comparer

Member Function Documentation

bool C5.KeyValuePairEqualityComparer< K, V >.Equals ( KeyValuePair< K, V >  entry1,
KeyValuePair< K, V >  entry2 
)

Test two entries for equality

Parameters
entry1First entry
entry2Second entry
Returns
True if keys are equal
int C5.KeyValuePairEqualityComparer< K, V >.GetHashCode ( KeyValuePair< K, V >  entry)

Get the hash code of the entry

Parameters
entryThe entry
Returns
The hash code of the key

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