MessagePropertyFilter.Label Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan atau menetapkan nilai yang menunjukkan apakah akan mengambil Label informasi properti saat menerima atau mengintip pesan.
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
Nilai Properti
true untuk menerima Label informasi; jika tidak, false. Default adalah true.
- Atribut
Contoh
Contoh kode berikut menunjukkan penggunaan Label properti .
// 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);
Keterangan
Properti LabelMessage kelas menentukan label pesan.