Add(Value: Variant): Integer;
Value. Value that should be added.
The Add method adds an element and returns its index.
Sub UserProc;
Var
ArrayL: IArrayList;
i: Integer;
Begin
ArrayL := New ArrayList.Create;
For i := 0 To Math.RandBetweenI(0, 1000) Do
ArrayL.Add(Math.RandBetween(0, 100));
End For;
i := ArrayL.Count;
End Sub UserProc;
After executing the example a dynamic array with random values is created, and the "i" variable contains its size.
See also: