Click or drag to resize

PriorityQueue<T>.Peek Method

Return the object with the lowest value in the PriorityQueue<T> without removing it.

Namespace: Ookii.Jumbo
Assembly: Ookii.Jumbo (in Ookii.Jumbo.dll) Version: 0.3.0+dc1307f20e065bb638e0b73a34cd216f57e486f1
Syntax
public T Peek()

Return Value

T
The object with the lowest value in the PriorityQueue<T>.
Exceptions
ExceptionCondition
InvalidOperationExceptionThe PriorityQueue<T> is empty.
Remarks

This method is similar to the Dequeue() method, but Peek() does not modify the PriorityQueue<T>.

If type T is a reference type, null can be added to the PriorityQueue<T> as a value.

This method is an O(1) operation.

See Also