New to Telerik UI for WinForms? Start a free 30-day trial

IComparer<T> implementation based on a Comparison.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.WinControls.RadDiagram.dll

Type Parameters:

T

The data type being compared.

Syntax:

C#
public sealed class ComparisonComparer<T>

Inheritance: objectComparisonComparer<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