共用方式為


MessageQueuePermissionEntry.Category 屬性

定義

取得佇列分類。

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());

適用於