Add(Value: String): Integer;
Value. String value that should be added to the array.
The Add method adds a new element with the specified value to the end of array and returns its index.
Sub UserProc;
Var
StrL: IStringList;
i: Integer;
Begin
StrL := New StringList.Create;
For i := 0 To Math.RandBetweenI(50, 100) Do
StrL.Add("Value " + Math.RandBetweenI(0, 100).ToString);
End For;
End Sub UserProc;
On executing the example a dynamic array of strings is generated.
See also: