Queue Class

Overview

  • First-in, First-out logic.
  • Acts as a queue of customers in a bank.

Good practice

Examples

Queueing and Dequeuing

Queue q = new Queue();
q.Enqueue("Hello");
q.Enqueue("World");
Console.WriteLine(q.Dequeue() + " " + q.Dequeue());
 
Queue<string> qg = new Queue<string>();
qg.Enqueue("Hello");
qg.Enqueue("World");
Console.WriteLine(qg.Dequeue() + " " + qg.Dequeue());
 
learning/exam70-536/queue.txt · Last modified: 2008/09/16 15:50 by david
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki