上面是我的代码,我在写该代码时就已经特别注意到了这一点,所以:m.Invoke(o,new object[]{"参数"}); 这里我使用了参数里面的 new object[]{} 里的内容就是参数的列表,比如要传递 1 和2 二个参数m.Invoke(o,new object[]{1,2});接收方也设置成相应的2个参数就可以了此文原文贴在CSDN 的文档区你可以去找找
解决方案 »
- 请问此方法能够获取数据集吗?不会被Dispose()清空吧??
- 线程间操作, 如何把线程里的数据打出来。贴出代码, 请各位指点!
- 大家能不能谈谈c#连接sql2005遇到的问题?
- 关于xslt+xml定制界面得问题!
- 急啊,有关罗马字符和汉字的处理
- Microsoft .NET Framework Version 2.0 Redistributable Package (x86) - 简体中文官方发布
- 谁可以提供c#在iPhone App的产品策划、设计、开发、测试的示例
- 在datagrid中,加入了一个checkbox控件,如何将datagrid当前读取(数据库中记录)的id值写入该checkbox中。谢谢。
- C#中如何知道当前屏幕大小?色彩数?
- C# Socket通信丢包的问题
- 找不到可安装的ISAM
- 多个进程同时写文件时的问题?
{
string [] Key_Array =new string[4]; string HD = “null“ ;
string Newy = “null“ ;
string Newn = “null“ ;
string Ody = “null“ ;
string Odn = “null“ ; Key_Array[0] = HD ;
Key_Array[1] = Newy ;
Key_Array[2] = Newn ;
Key_Array[3] = Ody ;
Key_Array[4] = Odn ; return Key_Array;
}
return x+y;
}那么就如下操作,先下载 http://www.zpcity.com/ArLi//commonprj/cls_LoadDll.cs,然后将它加到你的工程中(解决方案管理器中添加已存在项),然后使用它:object rs = ArLi.CommonPrj.cls_LoadDll.LoadAndRunMethodWith_ObjectBack("dll1.dll", "mydll", "dllclass", getmyint, new object[]{1,2});if (rs != null) {
if (obj.GetType() == typeof(string)) {
MessageBox.Show("错误:" + (string)rs);
}
else if (obj.GetType() == typeof(int)) {
//正常返回值
int i = (int)rs;
//TODO: 你的操作
}
}