MessageQueue.LastModifyTime 屬性

定義

取得上次修改佇列屬性的時間。Gets the last time the properties of a queue were modified.

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

屬性值

DateTime

DateTime,指出佇列屬性上次修改的時間。A DateTime that indicates when the queue properties were last modified.

屬性

例外狀況

存取訊息佇列方法時發生錯誤。An error occurred when accessing a Message Queuing method.

範例

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

// Display the value of the queue's LastModifyTime property.
Console.WriteLine("MessageQueue.LastModifyTime: {0}", queue.LastModifyTime);

備註

上次修改時間包括建立佇列的時間,以及 MessageQueue 修改訊息佇列佇列的任何屬性(例如) BasePriorityThe last modification time includes when the queue was created and any MessageQueue property that modifies the Message Queuing queue, such as BasePriority. 屬性的值 LastModifyTime 代表本機電腦的系統時間。The value of the LastModifyTime property represents the system time of the local computer.

您必須在 Refresh 取得屬性之前呼叫 LastModifyTime ,否則與此相關聯的修改時間 MessageQueue 可能不會是最新的。You must call Refresh before getting the LastModifyTime property; otherwise, the modification time associated with this MessageQueue might not be current.

下表顯示此屬性是否適用于各種工作組模式。The following table shows whether this property is available in various Workgroup modes.

工作組模式Workgroup mode 可用Available
本機電腦Local computer Yes
本機電腦和直接格式名稱Local computer and direct format name Yes
遠端電腦Remote computer No
遠端電腦和直接格式名稱Remote computer and direct format name No

適用於

另請參閱