MessageQueuePermissionEntry.Label 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取队列说明。
public:
property System::String ^ Label { System::String ^ get(); };
public string Label { get; }
member this.Label : string
Public ReadOnly Property Label As String
属性值
消息队列的标签。
示例
下面的代码示例显示消息队列权限条目的 Label 属性的值。
// 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 Label property.
Console::WriteLine("Label: {0}", entry->Label);
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 Label property.
Console.WriteLine("Label: {0}", entry.Label);