AddRange(Collection: ICollection);
Collection. Collection of elements that should be added to the array.
The AddRange method adds the collection to the end of the array.
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,500));
End For;
For i:=0 To Math.RandBetweenI(0,100) Do
ArrayL1.Add(Math.RandBetweenI(0,500));
End For;
ArrayL.AddRange(ArrayL1 As ICollection);
End Sub Main;
After executing the example two dynamic arrays are generated, and the value of the second one is added to the end of the first one.
See also: