IComparerClass.IntegerComparer

Syntax

IntegerComparer: IComparer;

Description

The IntegerComparer method returns an object to compare elements of integer type.

Example

Sub UserProc;
Var
    ArrayL: IArrayList;
    i: Integer;
Begin
    ArrayL := New ArrayList.Create;
    For i := 0 To Math.RandBetweenI(50100Do
        ArrayL.Add(Math.RandBetweenI(0100));
    End For;
    ArrayL.Sort(Comparer.IntegerComparer);
End Sub UserProc;

After executing the example a dynamic array of random integers is generated, this array is sorted in ascending order.

See also:

IComparerClass