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

Exposes a method that compares two objects.

Definition

Constructors

C#
protected ObjectComparer()

Methods

Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.

C#
public abstract int Compare(object x, object y)
Parameters:xobject

The first object to compare.

yobject

The second object to compare.

Returns:

int

A signed integer that indicates the relative values of x and y, as shown in the following table.Value Meaning Less than zero x is less than y. Zero x equals y. Greater than zero x is greater than y.

Implements: IComparer.Compare(object, object)