ISortedList.Clone

Syntax

Clone: ISortedList;

Description

The Clone method creates a copy of the array.

Example

Sub Main;

Var

SortList, SortList1: ISortedList;

i: Integer;

Begin

SortList:=New SortedList.Create;

For i:=0 To Math.RandBetweenI(50,100) Do

SortList.Add(Math.RandBetweenI(0,100),"Number "+Math.RandBetweenI(0,100).ToString);

End For;

SortList1:=SortList.Clone;

End Sub Main;

After executing the example the SortList1 array contains a copy of the SortList array.

See also:

ISortedList