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

适用于