共用方式為


MessageQueuePermissionEntry.Path 屬性

定義

取得佇列的路徑。

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

屬性值

MessageQueue 參考的佇列。

範例

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

// 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->Path);

// Display the value of the entry's Path property.
Console::WriteLine("Path: {0}", entry->Path);

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.Path);

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

適用於