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 (ICollection)

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

Parameters

col
The ICollection to copy elements from.

Exceptions

Exception Type Condition
ArgumentNullException col is a null reference (in Visual Basic Nothing).

Remarks

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.

See Also

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