Copies the Queue elements into a new array.
[Visual Basic] Overridable Public Function ToArray() As Object () [C#] public virtual object[] ToArray(); [C++] public: virtual Object* ToArray() []; [JScript] public function ToArray() : Object[];
A new array containing copies of the Queue 's elements.
This method can be overridden by a derived class.
The Queue is not modified. The order of the elements in the new array is the same as the order of the elements from the Queue 's head to its tail.