ToArray: Array;
The ToArray method converts the queue into a standard array.
Sub UserProc;
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 UserProc;
After executing the example the generated queue is converted into the Arr array.
See also: