Class KeyValuePairComparer<K,V>

Default comparer for dictionary entries in a sorted dictionary. Entry comparisons only look at keys and uses an externally defined comparer for that.

Implements

System.Collections.Generic.IComparer<KeyValuePair<K,V>>

Bases

object

Constructor overview

KeyValuePairComparer<K,V>(System.Collections.Generic.IComparer<K> comparer)

Method overview

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

Constructor details

KeyValuePairComparer<K,V>(System.Collections.Generic.IComparer<K> comparer) Create an entry comparer for a item comparer of the keys
Parameters:
comparer:Comparer of keys

Method details

F int Compare(KeyValuePair<K,V> entry1, KeyValuePair<K,V> entry2) Compare two entries
Returns:The result of comparing the keys
Parameters:
entry1:First entry
entry2:Second entry