4.9 Scenario: Sending a Message to a Queue
The following diagram depicts the use of MSMQQueue, MSMQQueueInfo, and MSMQMessage to send a message to a queue. First, an instance of the MSMQMessage is created and its properties set. Next an instance of MSMQQueueInfo is created and the format name is set. Next, the MSMQQueueInfo.Open method is called to get an instance of MSMQQueue. Finally, the MSMQMessage.Send method is called to send the message to a queue.

Figure 11: Sending a message to a queue