MessageQueue.Refresh Method ()


Refreshes the properties presented by the MessageQueue to reflect the current state of the resource.

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

public void Refresh()

Refresh synchronizes the properties of a MessageQueue with its associated Message Queuing server resource. If any property, such as Label or Category, has changed on the server since the time the MessageQueue was created, Refresh updates the MessageQueue with the new information.

The following table shows whether this method 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 demonstrates the use of Refresh.

// Connect to a queue on the local computer.
MessageQueue queue = new MessageQueue(".\\exampleQueue");

// Refresh the queue's property values to obtain its current state.

.NET Framework
Available since 1.1
Return to top