Creates a new Queue with the specified initial capacity and the default growth factor.
[Visual Basic] Overloads Public Sub New( _ ByVal capacity As Integer _ ) [C#] public Queue( int capacity ); [C++] public: Queue( int capacity ); [JScript] public function Queue( capacity : int );
Exception Type | Condition |
---|---|
ArgumentOutOfRangeException | capacity is less than (or equal to?) zero. |
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