NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Queue.Dequeue

Removes and returns the object at the head of the Queue.

[Visual Basic]
Overridable Public Function Dequeue() As Object
[C#]
public virtual object Dequeue();
[C++]
public: virtual Object* Dequeue();
[JScript]
public function Dequeue() : Object;

Return Value

The object removed from the head of the Queue, if the Queue is not empty; otherwise, a null reference (in Visual Basic Nothing).

Exceptions

Exception Type Condition
InvalidOperationException The Queue is empty.

Remarks

This method can be overridden by a derived class.

This method is similar to the Peek method, but Peek does not modify the Queue.

This method is an O(1) operation.

See Also

Queue Class | Queue Members | System.Collections Namespace | Enqueue | Peek