MessagePropertyFilter.Label Eigenschap

Definitie

Hiermee wordt een waarde opgehaald of ingesteld die aangeeft of eigenschapsgegevens moeten worden opgehaald Label bij het ontvangen of bekijken van een bericht.

public:
 property bool Label { bool get(); void set(bool value); };
[System.Messaging.MessagingDescription("MsgLabel")]
public bool Label { get; set; }
[<System.Messaging.MessagingDescription("MsgLabel")>]
member this.Label : bool with get, set
Public Property Label As Boolean

Waarde van eigenschap

trueom informatie te ontvangenLabel; anders. false De standaardwaarde is true.

Kenmerken

Voorbeelden

In het volgende codevoorbeeld ziet u hoe de Label eigenschap wordt gebruikt.

// Set the queue's MessageReadPropertyFilter property 
// to enable the message's Label property.
queue->MessageReadPropertyFilter->Label = true;

// Peek at the message. Time out after ten seconds 
// in case the message was not delivered.
orderMessage = queue->Peek(TimeSpan::FromSeconds(10.0));

// Display the value of the message's Label property.
Console::WriteLine("Message.Label: {0}", 
    orderMessage->Label);
// Set the queue's MessageReadPropertyFilter property to enable the
// message's Label property.
queue.MessageReadPropertyFilter.Label = true;

// Peek at the message. Time out after ten seconds in case the message
// was not delivered.
orderMessage = queue.Peek(TimeSpan.FromSeconds(10.0));

// Display the value of the message's Label property.
Console.WriteLine("Message.Label: {0}",
    orderMessage.Label);

Opmerkingen

De Label eigenschap van de Message klasse geeft het label van het bericht op.

Van toepassing op

Zie ook