MessagePropertyFilter.Label Egenskap

Definition

Hämtar eller anger ett värde som anger om du vill hämta Label egenskapsinformation när du tar emot eller granskar ett meddelande.

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

Egenskapsvärde

true för att ta emot Label information, falseannars . Standardvärdet är true.

Attribut

Exempel

Följande kodexempel visar hur egenskapen används 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);
// 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);

Kommentarer

Egenskapen Label för Message klassen anger meddelandets etikett.

Gäller för

Se även