MessageQueuePermissionAttribute::Label Property

 

Gets or sets the queue description.

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

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

Property Value

Type: System::String^

The label for the message queue.

Exception Condition
InvalidOperationException

The value is null.

The following code example gets and sets the value of a message queue permission attribute's Label 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 Label property value, based on the queue's Label
// property value.
attribute->Label = queue->Label;

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

queue->Close();

.NET Framework
Available since 1.1
Return to top
Show: