Sort(Comparer: IComparer);
Comparer. An object that compares array elements.
The Sort method sorts an array.
Sub Main;
Var
ArrayL: IArrayList;
i: Integer;
Begin
ArrayL:=New ArrayList.Create;
For i:=0 To Math.RandBetweenI(50,100) Do
ArrayL.Add(Math.RandBetweenI(0,100));
End For;
ArrayL.Sort(Comparer.IntegerComparer);
End Sub Main;
After executing the example a dynamic array of random numbers is generated, this array is sorted in ascending order.
See also: