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