IQueue

Ecng.Collections

Defines a generic queue interface for enqueueing, dequeueing, and peeking at items.

Методы

Dequeue
public T Dequeue()
result = iQueue.Dequeue()

Removes and returns the item at the front of the queue.

Возвращает: The item at the front of the queue.

Enqueue
public void Enqueue(T item)
iQueue.Enqueue(item)

Adds an item to the back of the queue.

item
The item to add to the queue.
Peek
public T Peek()
result = iQueue.Peek()

Returns the item at the front of the queue without removing it.

Возвращает: The item at the front of the queue.

TryDequeue
public bool TryDequeue(T item)
result = iQueue.TryDequeue(item)

Removes the item from the queue.

item
The removed item.

Возвращает: if the item is successfully removed; if the IQueue is empty.