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

IComparer<T> implementation based on a Comparison.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.Windows.Diagrams.Core.dll

Type Parameters:

T

The data type being compared.

Syntax:

C#
public sealed class ComparisonComparer<T> : IComparer<T>

Inheritance: objectComparisonComparer<T>

Implements: IComparer<T>

Constructors

Initializes a new instance of the ComparisonComparer<T> class.

C#
public ComparisonComparer(Comparison<T> comparison)
Parameters:comparisonComparison<T>

The comparison.

Properties

Gets or sets the comparison used in this comparer.

C#
public Comparison<T> Comparison { get; set; }
Property Value:

The comparison used in this comparer.

Methods

Compares the given items.

C#
public int Compare(T x, T y)
Parameters:xT

The x.

yT

The y.

Returns:

int

Implements: IComparer<T>.Compare(T, T)