110,534
社区成员
发帖
与我相关
我的任务
分享
[WebMethod]
public string hello() {
Assembly assembly = Assembly.Load("com.ms"); // 问题所在,该程序集该如何载入
//Assembly.Load("HelloWorld()").CreateInstance("com.ms.AbcTest()");
Type type = assembly.GetType("com.ehai.ms.AbcTest()");
Activator.CreateInstance(type);
MethodInfo mInfo = type.GetMethod("HelloWorld()");
return mInfo.Invoke(null,null).ToString();
//return "1";
}
namespace com.ms
{
public class AbcTest
{
public AbcTest()
{
//
// TODO: Add constructor logic here
//
}
public string HelloWorld()
{
return "Hello World";
}
}
}