Added in .NET 2.0
Represents a generic queue of objects
A queue represents a first-in, first out collection (FIFO)
items are added with "Enqueue" and removed with "Dequeue"
The "Peek" method retrieves the oldest object but does not remove it.
For example you might want to send messages to a resource that can only handle one message at a time.
The queue class is a good collection to use when you are managing a limited resource
|The number of elements in the queue
|Removes all the objects
|Does an element exist
|Copies the elements to an existing one-dimensional array
|Removes and returns the object at the beginning of the queue
|Adds an object to the end of the queue
|Returns an enumerator for the queue
|Returns the object at the beginning of the queue without removing it
This class is not to be confused with the Non Generic Queue class introduced in .NET 1.1
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext