IQueue.ToArray

Syntax

ToArray: Array;

Description

The ToArray method converts the queue into a standard array.

Example

Sub UserProc;
Var
    Que: IQueue;
    i: Integer;
    Arr: Array Of Variant;
Begin
    Que := New Queue.Create;
    For i := 0 To Math.RandBetweenI(50100Do
        Que.Enqueue("Value " + Math.RandBetweenI(0100).ToString);
    End For;
    Arr := Que.ToArray;
End Sub UserProc;

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

See also:

IQueue