A queue represents a first-in, first out collection (FIFO)
The queue class is a good collection to use when you are managing a limited resource


For example you might want to send messages to a resource that can only handle one message at a time.
The main methods are Dequeue and Enqueue

CountThe number of elements in the queue
ClearRemoves all the objects
ContainsDoes an element exist
CopyToCopies the elements to an existing one-dimensional array
DequeueRemoves and returns the object at the beginning of the queue
EnqueueAdds an object to the end of the queue
GetEnumeratorReturns an enumerator for the queue
PeekReturns the object at the beginning of the queue without removing it

What is a Generic.Queue ?

Represents a generic queue of objects
a first-in first out structure
items are added with "Enqueue" and removed with "Dequeue"
The "Peek" method retrieves the oldest object but does not remove it.

© 2020 Better Solutions Limited. All Rights Reserved. © 2020 Better Solutions Limited TopPrevNext