IStringList.ToArray

Syntax

ToArray: Array;

Description

The ToArray method converts into regular string array.

Comments

If array is empty, the ToArray method returns Null.

Example

Sub Main;

Var

StrL: IStringList;

s: Array Of String;

i: Integer;

Begin

StrL:=New StringList.Create;

For i:=0 To Math.RandBetweenI(50,100) Do

StrL.Add("Number "+Math.RandBetweenI(0,100).ToString);

End For;

s:=StrL.ToArray;

End Sub Main;

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

See also:

IStringList