Queue.Clear() : Queue « System.Collections « C# / C Sharp by API






Queue.Clear()

  


using System;
using System.Collections;

class MainClass
{
  static void Main(string[] args)
  {
    Queue a = new Queue(10);
    int x = 0;

    a.Enqueue(x);
    x++;
    a.Enqueue(x);
    foreach (int y in a)
    {
      Console.WriteLine(y);
    }

    a.Dequeue();
    a.Clear();
  }
}

   
    
  








Related examples in the same category

1.Queue.Dequeue()
2.Queue.Peek()