Copies the Stack 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 Stack 's elements.
This method can be overridden by a derived class.
The elements are copied onto the array in a last-in-first-out order, similar to the order a succession of calls to Pop would return the elements.
Stack Class | Stack Members | System.Collections Namespace | CopyTo | Pop