IQueue.ToArray

Syntax

ToArray: Array;

Description

The ToArray method converts the queue into a standard array.

Example

Sub Main;

Var

Que: IQueue;

i: Integer;

Arr: Array Of Variant;

Begin

Que:=New Queue.Create;

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

Que.Enqueue("Value "+Math.RandBetweenI(0,100).ToString);

End For;

Arr:=Que.ToArray;

End Sub Main;

After executing the example the generated queue is converted into the Arr array.

See also:

IQueue