MessageQueuePermissionAttribute::Path Property

 

Gets or sets the queue's path.

Namespace:   System.Messaging
Assembly:  System.Messaging (in System.Messaging.dll)

public:
property String^ Path {
	String^ get();
	void set(String^ value);
}

Property Value

Type: System::String^

The queue that is referenced by the MessageQueue.

Exception Condition
InvalidOperationException

The value is null.

The following code example gets and sets the value of a message queue permission attribute's Path property.


// Connect to a queue on the local computer.
MessageQueue^ queue = gcnew MessageQueue(".\\exampleQueue");

// Create a new instance of MessageQueuePermissionAttribute.
MessageQueuePermissionAttribute^ attribute =
    gcnew MessageQueuePermissionAttribute(
    System::Security::Permissions::SecurityAction::Assert);

// Set the attribute's Path property value, based on the queue's Path
// property value.
attribute->Path = queue->Path;

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

queue->Close();

.NET Framework
Available since 1.1
Return to top
Show: