共用方式為


MessageQueuePermissionEntry.PermissionAccess 屬性

定義

取得用於使用權限要求的使用權限存取等級。

public:
 property System::Messaging::MessageQueuePermissionAccess PermissionAccess { System::Messaging::MessageQueuePermissionAccess get(); };
public System.Messaging.MessageQueuePermissionAccess PermissionAccess { get; }
member this.PermissionAccess : System.Messaging.MessageQueuePermissionAccess
Public ReadOnly Property PermissionAccess As MessageQueuePermissionAccess

屬性值

MessageQueuePermissionAccess 值的位元組合。

範例

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

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

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

適用於