System.Messaging Reference (Document! X Sample)
System.Messaging Namespace / MessageQueue Class / Receive Method / Receive(MessageQueueTransactionType) Method
One of the MessageQueueTransactionType values, describing the type of transaction context to associate with the message.



In This Topic
    Receive(MessageQueueTransactionType) Method
    In This Topic
    Receives the first message available in the queue referenced by the MessageQueue. This call is synchronous, and blocks the current thread of execution until a message is available.
    Syntax
    'Declaration
     
    
    Public Overloads Function Receive( _
       ByVal transactionType As MessageQueueTransactionType _
    ) As Message
    'Usage
     
    
    Dim instance As MessageQueue
    Dim transactionType As MessageQueueTransactionType
    Dim value As Message
     
    value = instance.Receive(transactionType)

    Parameters

    transactionType
    One of the MessageQueueTransactionType values, describing the type of transaction context to associate with the message.

    Return Value

    A Message that references the first message available in the queue.
    Exceptions
    ExceptionDescription
    An error occurred when accessing a Message Queuing method.
    The transactionType parameter is not one of the MessageQueueTransactionType members.
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also