C# Queue Queue(Int32)
Description
Queue Queue(Int32)
initializes a new instance of the
Queue class that is empty, has the specified initial capacity, and uses the
default growth factor.
Syntax
Queue.Queue(Int32)
has the following syntax.
public Queue(
int capacity
)
Parameters
Queue.Queue(Int32)
has the following parameters.
capacity
- The initial number of elements that the Queue can contain.
Example
using System.Collections;
using System;/*from w ww . ja va 2s .c o m*/
public class MainClass{
public static void Main(String[] argv){
Queue myCollection = new Queue(4);
}
}
The code above generates the following result.