QueuemyQueue = new Queue (); myQueue.Enqueue("apple"); myQueue.Enqueue("banana"); myQueue.Enqueue("orange");
QueueIn this example, the Dequeue() method is used to remove the first element added to the queue (in this case, "apple") and display it on the console. The System.Collections Queue belongs to the `mscorlib` library which is a core package of the .NET framework.myQueue = new Queue (); myQueue.Enqueue("apple"); myQueue.Enqueue("banana"); myQueue.Enqueue("orange"); string fruit = myQueue.Dequeue(); Console.WriteLine(fruit);