PriorityQueue<TElement,TPriority>.Dequeue Method

Definition

Removes and returns the minimal element from the PriorityQueue<TElement,TPriority> - that is, the element with the lowest priority value.

C#
public TElement Dequeue();

Returns

TElement

The minimal element of the PriorityQueue<TElement,TPriority>.

Exceptions

The queue is empty.

Applies to

Product Versions
.NET 6, 7, 8, 9, 10