MessageReceiver.TryReceive Method (BrokeredMessage%)

Tries to receive a brokered message.

Namespace:  Microsoft.ServiceBus.Messaging
Assembly:  Microsoft.ServiceBus.Messaging (in Microsoft.ServiceBus.Messaging.dll)


Public Function TryReceive ( _
    <OutAttribute> ByRef message As BrokeredMessage _
) As Boolean
Dim instance As MessageReceiver
Dim message As BrokeredMessage
Dim returnValue As Boolean

returnValue = instance.TryReceive(message)
public bool TryReceive(
    out BrokeredMessage message
bool TryReceive(
    [OutAttribute] BrokeredMessage^% message
member TryReceive : 
        message:BrokeredMessage byref -> bool 
public function TryReceive(
    message : BrokeredMessage
) : boolean


Return Value

Type: System.Boolean
true if the attempt succeeds, false if it fails.

See Also


MessageReceiver Class

TryReceive Overload

Microsoft.ServiceBus.Messaging Namespace