IStringList.Clone

Syntax

Clone: IStringList;

Description

The Clone method creates a copy of the array.

Example

Sub Main;

Var

StrL, StrL1: IStringList;

i: Integer;

Begin

StrL:=New StringList.Create;

StrL1:=New StringList.Create;

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

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

End For;

StrL1:=StrL.Clone;

StrL1.Clear;

End Sub Main;

After executing the example the StrL1 array contains a copy of the StrL array.

See also:

IStringList