共用方式為


MessageQueuePermissionEntry.Label 屬性

定義

取得佇列描述。

public:
 property System::String ^ Label { System::String ^ get(); };
public string Label { get; }
member this.Label : string
Public ReadOnly Property Label As String

屬性值

訊息佇列的標記。

範例

下列程式代碼範例會顯示消息佇列許可權專案 Label 之 屬性的值。

// 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 Label property.
Console::WriteLine("Label: {0}", entry->Label);

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 Label property.
Console.WriteLine("Label: {0}", entry.Label);

適用於