Share via


Queue Constructor

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Initializes a new instance of the Queue class that is empty, has the default initial capacity, and uses the default growth factor.

Namespace:  System.Collections
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Sub New
public Queue()
public:
Queue()
new : unit -> Queue
public function Queue()

Remarks

The capacity of a Queue is the number of elements the Queue can hold. As elements are added to a Queue, the capacity is automatically increased as required through reallocation. The capacity can be decreased by calling TrimToSize.

The growth factor is the number by which the current capacity is multiplied when a greater capacity is required. The growth factor is determined when the Queue is constructed.

This constructor is an O(1) operation.

.NET Framework Security

See Also

Reference

Queue Class

System.Collections Namespace