Better ListView Class Reference |

# NaturalComparer.Compare Method

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

public int Compare(
object x,
object y
);

#### Parameters

x
  The first object to compare.
y
  The second object to compare.

#### Return Value

Value Condition Less than zero x is less than y. Zero x equals y. Greater than zero x is greater than y.

#### Implements

IComparer.Compare

#### Exceptions

Exception Type | Condition
--- | ---
ArgumentException | Neither x nor y implements the IComparable interface. -or- x and y are of different types and neither one can handle comparisons with the other.

#### See Also

NaturalComparer Class | ComponentOwl.BetterListView Namespace