469,582 Members | 2,386 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,582 developers. It's quick & easy.

System.Messaging?

Hello everyone
I'm trying to use the namespace using System.Messaging. My Visual Studio.Net
could not recognize this namespace. Should I have to install a plug in or
what should I do to have this piece of demo works

public class MQSend
{

public static void Main(String[] args)

{

string appName = Environment.GetCommandLineArgs()[0];

if(args.Length != 2)

{

Console.WriteLine("Usage: " + appName +" <queue> <message>");

}

else

{

string mqPath = ".\\" + args[0];

if(!MessageQueue.Exists(mqPath))

{

MessageQueue.Create(mqPath);

}

MessageQueue mq = new MessageQueue(mqPath);

mq.Send(args[1]);

}

Console.WriteLine();

Console.WriteLine("Press Enter to continue...");

Console.ReadLine();

}

}
Nov 16 '05 #1
1 9660
Hi,

You have to add a reference to it:
From menu:
Project/Add reference and search System.Messaging.dll in the list

You can do a similar thing using Right click over "References" in the
project explorer

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Hai Nguyen" <ha******@neo.tamu.edu> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hello everyone
I'm trying to use the namespace using System.Messaging. My Visual Studio.Net could not recognize this namespace. Should I have to install a plug in or
what should I do to have this piece of demo works

public class MQSend
{

public static void Main(String[] args)

{

string appName = Environment.GetCommandLineArgs()[0];

if(args.Length != 2)

{

Console.WriteLine("Usage: " + appName +" <queue> <message>");

}

else

{

string mqPath = ".\\" + args[0];

if(!MessageQueue.Exists(mqPath))

{

MessageQueue.Create(mqPath);

}

MessageQueue mq = new MessageQueue(mqPath);

mq.Send(args[1]);

}

Console.WriteLine();

Console.WriteLine("Press Enter to continue...");

Console.ReadLine();

}

}

Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Fidias Gil de Montes | last post: by
1 post views Thread by Hai Nguyen | last post: by
reply views Thread by Frederico Guimar?es via DotNetMonster.com | last post: by
1 post views Thread by John A Grandy | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.