IStringList.Add

Syntax

Add(Value: String): Integer;

Parameters

Value. String value that should be added to the array.

Description

The Add method adds a new element with the specified value to the end of array and returns its index.

Example

Sub UserProc;
Var
    StrL: IStringList;
    i: Integer;
Begin
    StrL := New StringList.Create;
    For i := 0 To Math.RandBetweenI(50100Do
        StrL.Add("Value " + Math.RandBetweenI(0100).ToString);
    End For;
End Sub UserProc;

On executing the example a dynamic array of strings is generated.

See also:

IStringList