Muokkaa

Jaa


MessageQueuePermissionEntry.MachineName Property

Definition

Gets the name of the computer where the Message Queuing queue is located.

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

Property Value

The name of the computer where the queue is located.

Examples

The following code example displays the value of a message queue permission entry's MachineName property.

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

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

Applies to