IArrayList.Clone

Syntax

Clone: IArrayList;

Description

The Clone method creates a copy of the array.

Example

Sub UserProc;
Var
    ArrayL, ArrayL1: IArrayList;
    i: Integer;
Begin
    ArrayL := New ArrayList.Create;
    ArrayL1 := New ArrayList.Create;
    For i := 0 To Math.RandBetweenI(0100Do
        ArrayL.Add(Math.RandBetweenI(0100));
    End For;
    ArrayL1 := ArrayL.Clone;
    ArrayL.Clear;
End Sub UserProc;

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

See also:

IArrayList