Completes the specified asynchronous receive operation.
Assembly: System.Messaging (in System.Messaging.dll)
BeginReceive can specify a time-out, which causes the ReceiveCompleted event to be raised if the time-out occurs before a message appears in the queue. When a time-out occurs without a message arriving in the queue, a subsequent call to throws an exception.
is used to read (removing from the queue) the message that caused the ReceiveCompleted event to be raised.
If you want to continue to asynchronously receive messages, you can again call BeginReceive after calling .
The following table shows whether this method is available in various Workgroup modes.
Local computer and direct format name
Remote computer and direct format name
The following code example chains asynchronous requests. It assumes there is a queue on the local computer called "myQueue". The Main function begins the asynchronous operation that is handled by the MyReceiveCompleted routine. MyReceiveCompleted processes the current message and begins a new asynchronous receive operation.