MessageQueue.CreateTime 屬性

定義

取得佇列在訊息佇列中建立的時間和日期。Gets the time and date that the queue was created in Message Queuing.

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

屬性值

DateTime

DateTime,表示佇列的建立日期和時間。A DateTime that represents the date and time at which the queue was created.

屬性

例外狀況

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

範例

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

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

備註

CreateTime 指的是訊息佇列伺服器上的佇列,而不是實例的佇列 MessageQueueCreateTime refers to the queue on the Message Queuing server, not the MessageQueue instance.

如果佇列存在,這個屬性會代表建立佇列的時間,並調整為佇列所在伺服器的本機時間。If the queue exists, this property represents the time the queue was created, adjusted to the local time of the server on which the queue exists.

下表顯示此屬性是否適用于各種工作組模式。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

適用於

另請參閱