does anyone know a way of checking that the creation of a private message queue (or attaching to an already existsing message queue) has actually worked?
In my program, I create an instance of the MessageQueue class tied to an existing queue by calling the MessageQueue constructor with a 'Format Name' string I've constructed. The string includes the queue name which I extract from a config file. This all
works well as long as the queue name is correct. If, however, the referenced queue does not exist then I was expecting the constructor to throw an exception. Unfortunately, it doesn't do this. So, I've tried accessing some of the members of the MessageQueue
class after the constructor has executed. In some circumstances accessing MessageQueue.FormatName caused an exception but in other circumstances it didn't.
Is there any definitive, fool-proof way of determining an instance of a MessageQueue class is connected to a valid queue?
View Complete Post