Share via


MessagePropertyFilter.SentTime Properti

Definisi

Mendapatkan atau menetapkan nilai yang menunjukkan apakah akan mengambil SentTime informasi properti saat menerima atau mengintip pesan.

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

Nilai Properti

true untuk menerima SentTime informasi; jika tidak, false. Default adalah false.

Atribut

Contoh

Contoh kode berikut menunjukkan penggunaan SentTime properti .

// Set the queue's MessageReadPropertyFilter property 
// to enable the message's SentTime property.
queue->MessageReadPropertyFilter->SentTime = 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 SentTime property.
Console::WriteLine("Message.SentTime: {0}", 
    orderMessage->SentTime);
// Set the queue's MessageReadPropertyFilter property to enable the
// message's SentTime property.
queue.MessageReadPropertyFilter.SentTime = 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 SentTime property.
Console.WriteLine("Message.SentTime: {0}",
    orderMessage.SentTime);

Keterangan

Properti SentTimeMessage kelas menunjukkan tanggal dan waktu komputer pengirim saat pesan dikirim oleh Manajer Antrean sumber.

Berlaku untuk

Lihat juga