Message.SentTime 屬性

定義

取得來源佇列管理員傳送訊息時傳送電腦上的日期和時間。Gets the date and time on the sending computer that the message was sent by the source queue manager.

public:
 property DateTime SentTime { DateTime get(); };
[System.Messaging.MessagingDescription("MsgSentTime")]
public DateTime SentTime { get; }
[<System.Messaging.MessagingDescription("MsgSentTime")>]
member this.SentTime : DateTime
Public ReadOnly Property SentTime As DateTime

屬性值

DateTime

DateTime,表示訊息傳送的時間。A DateTime that represents the time the message was sent.

屬性

例外狀況

未傳送訊息。The message has not been sent. 這個屬性只能在從佇列擷取的訊息中讀取。This property can only be read on messages retrieved from a queue.

-或--or- 篩選訊息佇列以忽略 SentTime 屬性。The message queue is filtered to ignore the SentTime property.

範例

下列程式碼範例會顯示訊息的 SentTime 屬性值。The following code example displays the value of a message's SentTime property.

備註

SentTime屬性會調整為建立此類別實例之電腦的本機時間 MessageThe SentTime property is adjusted to the local time of the computer on which this instance of the Message class was created. 這個時區可能與來源和目的地佇列的時區不同。This time zone could be different from those of the source and destination queues.

適用於