Copies the elements of a collection into a new Stack with the same capacity as the number of elements copied.
[Visual Basic] Overloads Public Sub New( _ ByVal col As ICollection _ ) [C#] public Stack( ICollection col ); [C++] public: Stack( ICollection* col ); [JScript] public function Stack( col : ICollection );
Exception Type | Condition |
---|---|
ArgumentNullException | col is a null reference (in Visual Basic Nothing). |
The elements are copied onto the Stack in the same order they are read by the ICollection 's IEnumerator.
Stack Class | Stack Members | System.Collections Namespace | Stack Constructor Overload List | ICollection | IEnumerator