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.