Class KeyValuePairComparer<TKey, TValue>
A comparer of key-value pairs based on a comparison of the respective keys.
Inheritance
Namespace: Telerik.Windows.Diagrams.Core
Assembly: Telerik.Windows.Diagrams.Core.dll
Syntax
public class KeyValuePairComparer<TKey, TValue> : Object, IComparer<KeyValuePair<TKey, TValue>>
Type Parameters
TKey
The type of the key. |
TValue
The type of the value. |
Constructors
KeyValuePairComparer()
Initializes a new instance of the KeyValuePairComparer<TKey, TValue> class.
Declaration
public KeyValuePairComparer()
KeyValuePairComparer(IComparer<TKey>)
Initializes a new instance of the KeyValuePairComparer<TKey, TValue> class.
Declaration
public KeyValuePairComparer(IComparer<TKey> comparer)
Parameters
System.Collections.Generic.IComparer<TKey>
comparer
The comparer. |
KeyValuePairComparer(Comparison<TKey>)
Initializes a new instance of the KeyValuePairComparer<TKey, TValue> class.
Declaration
public KeyValuePairComparer(Comparison<TKey> comparison)
Parameters
System.Comparison<TKey>
comparison
The comparison. |
Methods
Compare(TKey, TKey)
Compares the two values.
Declaration
public int Compare(TKey x, TKey y)
Parameters
TKey
x
The x. |
TKey
y
The y. |
Returns
System.Int32
|
Compare(KeyValuePair<TKey, TValue>, KeyValuePair<TKey, TValue>)
Compares the two key pairs.
Declaration
public int Compare(KeyValuePair<TKey, TValue> x, KeyValuePair<TKey, TValue> y)
Parameters
System.Collections.Generic.KeyValuePair<TKey, TValue>
x
The x. |
System.Collections.Generic.KeyValuePair<TKey, TValue>
y
The y. |
Returns
System.Int32
|