IArrayList.Clone

Syntax

Clone: IArrayList;

Description

The Clone method creates a copy of the array.

Example

Sub Main;

Var

ArrayL, ArrayL1: IArrayList;

i: Integer;

Begin

ArrayL:=New ArrayList.Create;

ArrayL1:=New ArrayList.Create;

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

ArrayL.Add(Math.RandBetweenI(0,100));

End For;

ArrayL1:=ArrayL.Clone;

ArrayL.Clear;

End Sub Main;

After executing the example the ArrayL1 array contains the copy of the ArrayL array.

See also:

IArrayList