Class KeyValuePairEquatable<K,V>

Default equatable for dictionary entries. Operations only look at keys and uses an externaly defined equatable for that.

Implements

IEquatable<KeyValuePair<K,V>>

Bases

object

Constructor overview

KeyValuePairEquatable<K,V>(),
KeyValuePairEquatable<K,V>(IEquatable<K> keyequatable)

Method overview

Equals(KeyValuePair<K,V> entry1, KeyValuePair<K,V> entry2),
Equals(object obj), Inherited from object,
Finalize(), Inherited from object,
GetHashCode(KeyValuePair<K,V> entry),
GetHashCode(), Inherited from object,
GetType(), Inherited from object,
MemberwiseClone(), Inherited from object,
ToString(), Inherited from object

Constructor details

KeyValuePairEquatable<K,V>() Create an entry equatable using the default equatable for keys
KeyValuePairEquatable<K,V>(IEquatable<K> keyequatable) Create an entry equatable from a specified item equatable for the keys
Parameters:
keyequatable:The key equatable

Method details

F bool Equals(KeyValuePair<K,V> entry1, KeyValuePair<K,V> entry2) Test two entries for equality
Returns:True if keys are equal
Parameters:
entry1:First entry
entry2:Second entry
F int GetHashCode(KeyValuePair<K,V> entry) Get the hash code of the entry
Returns:The hash code of the key
Parameters:
entry:The entry