MessageQueuePermissionEntry.Category 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得佇列分類。
public:
property System::String ^ Category { System::String ^ get(); };
public string Category { get; }
member this.Category : string
Public ReadOnly Property Category As String
屬性值
佇列分類 (訊息佇列型別識別項) 可允許應用程式將它的佇列分類。
範例
下列程式代碼範例會顯示消息佇列許可權專案 Category 之 屬性的值。
// Connect to a queue on the local computer.
MessageQueue^ queue = gcnew MessageQueue(".\\exampleQueue");
// Create a new instance of MessageQueuePermissionEntry.
MessageQueuePermissionEntry^ entry = gcnew MessageQueuePermissionEntry(
MessageQueuePermissionAccess::Receive,
queue->MachineName,
queue->Label,
queue->Category.ToString());
// Display the value of the entry's Category property.
Console::WriteLine("Category: {0}", entry->Category->ToString());
queue->Close();
// Connect to a queue on the local computer.
MessageQueue queue = new MessageQueue(".\\exampleQueue");
// Create a new instance of MessageQueuePermissionEntry.
MessageQueuePermissionEntry entry = new MessageQueuePermissionEntry(
MessageQueuePermissionAccess.Receive,
queue.MachineName,
queue.Label,
queue.Category.ToString());
// Display the value of the entry's Category property.
Console.WriteLine("Category: {0}", entry.Category.ToString());