Updated: Jan 19, 2022
It represents a first-in, first-out collection. It is used to create an array that supports the logic of first-in, first-out of elements. This article will provide code examples for its main properties and methods.
Note: the syntax of adding and removing items in the list, we will use the ‘enqueue’ (add item) and ‘deque’ (remove item).
static void Main(string args)
//Creating a new Queue
Queue QueueLearning = new Queue();
//Determines whether an element is in the Queue
//Returns the first object in the Queue
//Remove the first element from the queue
//Remove all objects from the Queue