Using .NET
WebSphere® MQ classes for .NET allow a program written in the .NET programming framework to connect to WebSphere MQ as a WebSphere MQ MQI client or to connect directly to a WebSphere MQ server.
If you have applications which use Microsoft's .NET Framework and want to take advantage of the facilities of WebSphere MQ, you must use WebSphere MQ classes for .NET.
The object-oriented WebSphere MQ .NET interface is different from the MQI interface in that it uses methods of objects rather than using the MQI verbs.
MQCONN, MQDISC, MQOPEN, MQCLOSE,
MQINQ, MQSET, MQGET, MQPUT, MQSUB
These verbs all take, as a parameter, a handle to the WebSphere MQ object on which they are to operate. Because .NET is object-oriented, the .NET programming interface turns this round. Your program consists of a set of WebSphere MQ objects, which you act upon by calling methods on those objects. You can write programs in any language supported by .NET.
When you use the procedural interface, you disconnect from a queue manager by using the call MQDISC(Hconn, CompCode, Reason), where Hconn is a handle to the queue manager.
// declare an object of type queue manager
MQQueueManager queueManager=new MQQueueManager();
...
// do something...
...
// disconnect from the queue manager
queueManager.Disconnect();
WebSphere MQ classes for .NET is a set of classes that enable .NET applications to interact with WebSphere MQ. They represent the various components of WebSphere MQ which your application uses, such as queue managers, queues, channels and messages. For details of these classes, see The WebSphere MQ .NET classes and interfaces.
Before you can compile any applications that you write, you must have a .NET Framework installed. For instructions on installing the WebSphere MQ classes for .NET and the .NET Framework, see Installing WebSphere MQ classes for .NET.