Queue

Description

The Queue class implements an object that is a queue of elements.

Comment

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.

Class object properties inherited from ICollection

  Property name Brief description
Count The Count property returns the number of array elements.

Class object methods inherited from IQueue

  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 an element exists.
Dequeue The Dequeue method extracts value of the element from the queue.
Enqueue The Enqueue method places the element into the queue.
Peek The Peek method extracts value of the queue without removing the element.
ToArray The ToArray method converts the queue into a standard array.

Class object methods inherited from ICollection

  Method name Brief description
CopyTo The CopyTo method copies the collection into an array.

See also:

Collections Assembly Classes