PriorityQueue<TElement,TPriority>.TryDequeue Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Removes the minimal element from the PriorityQueue<TElement,TPriority>, and copies it and its associated priority to the element
and priority
arguments.
public:
bool TryDequeue([Runtime::InteropServices::Out] TElement % element, [Runtime::InteropServices::Out] TPriority % priority);
public bool TryDequeue (out TElement element, out TPriority priority);
member this.TryDequeue : 'Element * 'Priority -> bool
Public Function TryDequeue (ByRef element As TElement, ByRef priority As TPriority) As Boolean
Parameters
- element
- TElement
When this method returns, contains the removed element.
- priority
- TPriority
When this method returns, contains the priority associated with the removed element.
Returns
true
if the element is successfully removed; false
if the PriorityQueue<TElement,TPriority> is empty.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: Under hela 2024 kommer vi att fasa ut GitHub-problem som feedbackmekanism för innehåll och ersätta det med ett nytt feedbacksystem. Mer information finns i:Skicka och visa feedback för