Export (0) Print
Expand All

MessageQueue.Peek Method

Returns a copy of the first message in the queue without removing the message from the queue.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  Name Description
Public method Peek() Returns without removing (peeks) the first message in the queue referenced by this MessageQueue. The Peek method is synchronous, so it blocks the current thread until a message becomes available.
Public method Peek(TimeSpan) Returns without removing (peeks) the first message in the queue referenced by this MessageQueue. The Peek method is synchronous, so it blocks the current thread until a message becomes available or the specified time-out occurs.
Public method Peek(TimeSpan, Cursor, PeekAction) Returns without removing (peeks) the current or next message in the queue, using the specified cursor. The Peek method is synchronous, so it blocks the current thread until a message becomes available or the specified time-out occurs.
Top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft