MessageQueuePermissionAttribute.Label Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the queue description.
public:
property System::String ^ Label { System::String ^ get(); void set(System::String ^ value); };
public string Label { get; set; }
member this.Label : string with get, set
Public Property Label As String
Property Value
The label for the message queue.
Exceptions
The value is null
.
Examples
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();
// Connect to a queue on the local computer.
MessageQueue queue = new MessageQueue(".\\exampleQueue");
// Create a new instance of MessageQueuePermissionAttribute.
MessageQueuePermissionAttribute attribute =
new 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);
Applies to
Συνεργαστείτε μαζί μας στο GitHub
Μπορείτε να βρείτε την πηγή για αυτό το περιεχόμενο στο GitHub, όπου μπορείτε επίσης να δημιουργήσετε και να εξετάσετε ζητήματα και αιτήματα έλξης. Για περισσότερες πληροφορίες, ανατρέξτε στον οδηγό συνεργατών.