Copies the elements from a collection into a new Queue with the same initial capacity as the number of elements copied, and the default growth factor.
[Visual Basic] Overloads Public Sub New( _ ByVal col As ICollection _ ) [C#] public Queue( ICollection col ); [C++] public: Queue( ICollection* col ); [JScript] public function Queue( col : ICollection );
Exception Type | Condition |
---|---|
ArgumentNullException | col is a null reference (in Visual Basic Nothing). |
The order of the elements in the new Queue is the same order that the ICollection 's enumerator iterates through the ICollection 's elements.
When the number of elements in the Queue reaches its capacity, the capacity is automatically increased. The new capacity is determined by multiplying the current capacity by the growth factor.
The initial capacity is the starting capacity of the new Queue.
The default growth factor is 2.0.
Queue Class | Queue Members | System.Collections Namespace | Queue Constructor Overload List | ICollection