New to Telerik UI for WPFStart a free 30-day trial

A 2-tuple comparer assuming that the first entry acts as a comparable key.

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 MupleComparer<TKey, TValue> : IComparer<Muple<TKey, TValue>> where TKey : IComparable

Inheritance: objectMupleComparer<TKey, TValue>

Implements: IComparer<Muple<TKey, TValue>>

Constructors

Initializes a new instance of the MupleComparer<TKey, TValue> class.

C#
public MupleComparer()

Initializes a new instance of the MupleComparer<TKey, TValue> class.

C#
public MupleComparer(IComparer<TKey> comparer)
Parameters:comparerIComparer<TKey>

The comparer.

Properties

Gets the default comparer for the type of association specified.

C#
public static MupleComparer<TKey, TValue> DefaultComparer { get; }
Property Value:

The default comparer.

Methods

Compares the two objects.

C#
public int Compare(Muple<TKey, TValue> x, Muple<TKey, TValue> y)
Parameters:xMuple<TKey, TValue>

The x.

yMuple<TKey, TValue>

The y.

Returns:

int

Implements: IComparer<Muple<TKey, TValue>>.Compare(Muple<TKey, TValue>, Muple<TKey, TValue>)

Compares the two values.

C#
public int Compare(TKey x, TKey y)
Parameters:xTKey

The x.

yTKey

The y.

Returns:

int