System.Messaging Reference (Document! X Sample)



The location of the queue to find.
Exists Method
Determines whether a Message Queuing queue exists at the specified path.
Syntax
'Declaration
 
Public Shared Function Exists( _
   ByVal path As String _
) As Boolean
'Usage
 
Dim path As String
Dim value As Boolean
 
value = MessageQueue.Exists(path)
public static bool Exists( 
   string path
)
public:
static bool Exists( 
   String^ path
) 

Parameters

path
The location of the queue to find.

Return Value

true if a queue with the specified path exists; otherwise, false.
Exceptions
ExceptionDescription
The path syntax is not valid.
An error occurred when accessing a Message Queuing method.-or- The Exists method is being called on a remote private queue
The application used format name syntax when verifying queue existence.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also