NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Queue Constructor (Int32)

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
);

Parameters

capacity
The initial number of elements that the Queue can contain.

Exceptions

Exception Type Condition
ArgumentOutOfRangeException capacity is less than (or equal to?) zero.

Remarks

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.

See Also

Queue Class | Queue Members | System.Collections Namespace | Queue Constructor Overload List