IComparer<T>.Compare Method

Definition

Compares two values and returns a value that indicates their relative order.

Delphi
function Compare(const Left: T; const Right: T): Integer;

Parameters

Left
T

The first value to compare.

Right
T

The second value to compare.

Returns

Integer

A value less than zero if Left is less than Right, zero if they are equal, or a value greater than zero if Left is greater than Right.