MessagePropertyFilter.Label Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value that indicates whether to retrieve Label property information when receiving or peeking a message.
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
Property Value
true
to receive Label information; otherwise, false
. The default is true
.
- Attributes
Examples
The following code example demonstrates the use of the Label property.
// 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);
Remarks
The Label property of the Message class specifies the label of the message.
Applies to
See also
ทํางานร่วมกับเราใน GitHub
แหล่งที่มาสำหรับเนื้อหานี้สามารถพบได้บน GitHub ซึ่งคุณยังสามารถสร้างและตรวจสอบปัญหาและคำขอดึงข้อมูลได้ สำหรับข้อมูลเพิ่มเติม ให้ดูคู่มือผู้สนับสนุนของเรา