The Queue class implements an object that is a queue of elements.
Principle of queue operation is First in - First out. Elements are always added to the end of a queue. Queues are useful for storing data in the same order, they were received, for the forthcoming data procesing. Elements are always added to the end of a queue and removed from its beginning. To work with elements, various queue methods are used: Dequeue, Enqueue, Peek. To check the presence of an element in a queue, use the Contains method.
Property name | Brief description | |
Count | The Count property returns the number of array elements. |
Method name | Brief description | |
Clear | The Clear method clears the queue. | |
Clone | The Clone method creates a copy of the queue. | |
Contains | The Contains method checks if queue contains an element with the specified value. | |
Dequeue | The Dequeue method gets a value of the element that is placed as the first one from a queue. | |
Enqueue | The Enqueue method queues an element with the specified value. | |
Peek | The Peek method gets element value from the queue without dequeueing the element. | |
ToArray | The ToArray method converts the queue into a standard array. |
Method name | Brief description | |
CopyTo | The CopyTo method copies the collection into an array. |
See also: