MessageQueue.Id Property

Gets the unique Message Queuing identifier of the queue.

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

public Guid Id { get; }
/** @property */
public Guid get_Id ()

public function get Id () : Guid

Not applicable.

Property Value

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

Exception typeCondition


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


Local computer


Local computer and direct format name


Remote computer


Remote computer and direct format name


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);

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

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0

Community Additions