MessageQueue.Id Property

 

Gets the unique Message Queuing identifier of the queue.

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

[MessagingDescriptionAttribute("MQ_GuidId")]
public Guid Id { get; }

Property Value

Type: System.Guid

A Id that represents the message identifier generated by the Message Queuing application.

Exception Condition
MessageQueueException

An error occurred when accessing a Message Queuing method.

Message Queuing sets the Id property when it creates the queue. This property is only available for public queues.

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

No

Remote computer and direct format name

No

The following code example displays the value of a message queue's Id property.

// Display the value of the queue's Id property.
Console.WriteLine("MessageQueue.Id: {0}", queue.Id);

.NET Framework
Available since 1.1
Return to top
Show: