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:
C#
public class KeyValuePairComparer<TKey, TValue> : IComparer<KeyValuePair<TKey, TValue>>
Inheritance: objectKeyValuePairComparer<TKey, TValue>
Implements:
Constructors
Initializes a new instance of the KeyValuePairComparer<TKey, TValue> class.
C#
public KeyValuePairComparer()
Initializes a new instance of the KeyValuePairComparer<TKey, TValue> class.
C#
public KeyValuePairComparer(Comparison<TKey> comparison)
The comparison.
Initializes a new instance of the KeyValuePairComparer<TKey, TValue> class.
C#
public KeyValuePairComparer(IComparer<TKey> comparer)
The comparer.
Methods
Compares the two key pairs.
C#
public int Compare(KeyValuePair<TKey, TValue> x, KeyValuePair<TKey, TValue> y)
The x.
yKeyValuePair<TKey, TValue>The y.
Returns:Implements:
Compares the two values.