C# Queue Queue(Int32, Single)

Description

Queue Queue(Int32, Single) initializes a new instance of the Queue class that is empty, has the specified initial capacity, and uses the specified growth factor.

Syntax

Queue.Queue(Int32, Single) has the following syntax.


public Queue(
  int capacity,
  float growFactor
)

Parameters

Queue.Queue(Int32, Single) has the following parameters.

  • capacity - The initial number of elements that the Queue can contain.
  • growFactor - The factor by which the capacity of the Queue is expanded.

Example


using System;/*from  ww  w. j  a va2  s .c  o  m*/
using System.Collections;
public class MainClass
{
    public static void Main(String[] argv)
    {
        Queue myCollection = new Queue(5, 0.5F);


    }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Collections »




ArrayList
BitArray
Comparer
Hashtable
Queue
SortedList
Stack