为什么我实例化不了
Message message=new Message();我做ASP.net的时候想打这代码~为什么不会变颜色啊~
本人菜鸟啊~求高手!!! --------------------编程问答-------------------- 翻翻msdn啦。
看看Message类的定义啦。
Message应该是没有定义构造函数。 --------------------编程问答-------------------- 哦~谢谢~我去看看
--------------------编程问答-------------------- 如果要用一个已经有的类,先要引用它
比如要使用Message
那么就必须在开头写下:
using System.Messaging;
--------------------编程问答--------------------
这个类在你的项目中定义了吗,如果没有,引用它所在的程序集。 --------------------编程问答-------------------- 怎么我见其他人不用写都可以用呢?? --------------------编程问答-------------------- 我不知道怎么定义这个类啊~ --------------------编程问答-------------------- 还有我用using System.Message 没有这个东西啊!! --------------------编程问答-------------------- using System.Messaging;
得在项目中添加引用 System.Messaging.dll 文件
才能引用 using System.Messaging;
引用后 就可以
Message me = new Message();
--------------------编程问答-------------------- System.Messaging.dll 这个文件哪有呢??
--------------------编程问答-------------------- using System.Messaging;
System.Messaging.Message msg = new System.Messaging.Message();
msg.Body = "";
--------------------编程问答-------------------- http://msdn.microsoft.com/zh-cn/library/system.messaging.message(v=VS.80).aspx --------------------编程问答-------------------- 添加引用
补充:.NET技术 , C#