IStringList.ToArray

Syntax

ToArray: Array;

Description

The ToArray method converts into regular string array.

Comments

If the current array is empty, the ToArray method returns Null.

Example

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

After executing the example the "s" variable contains a string array that consists of one string.

See also:

IStringList