MessageQueue.QueueName Property
Gets or sets the friendly name that identifies the queue.
Assembly: System.Messaging (in System.Messaging.dll)
[MessagingDescriptionAttribute("MQ_QueueName")] [BrowsableAttribute(false)] public string QueueName { get; set; }
Property Value
Type: System.StringThe name that identifies the queue referenced by this MessageQueue. The value cannot be null.
| Exception | Condition |
|---|---|
| ArgumentException |
The queue name is null. |
You can combine the QueueName with the MachineName to create a friendly Path name for the queue. The syntax for the friendly name variation of the Path property depends on the type of queue, as shown in the following table.
|
Queue type |
Syntax |
|---|---|
|
Public queue |
MachineName\QueueName |
|
Private queue |
MachineName\Private$\QueueName |
|
Journal queue |
MachineName\QueueName\Journal$ |
Use "." to represent the local computer.
Changing the QueueName property affects the Path property. If you set the QueueName without setting the MachineName property, the Path property becomes .\QueueName. Otherwise, the Path becomes MachineName\QueueName.
The following table shows whether this property is available in various Workgroup modes.
|
Workgroup mode |
Available |
|---|---|
|
Local computer |
Yes |
|
Local computer and direct format name |
Yes |
|
Remote computer |
Yes |
|
Remote computer and direct format name |
No |
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.