先创建好动态库(添加 window 下的 类库)编译生成dll
//string path = Environment.CurrentDirectory;//AppDomain.CurrentDomain.BaseDirectory
System.Reflection.Assembly ass = System.Reflection.Assembly.LoadFrom(“dll地址”);
System.Type t = ass.GetType("QueryLis.QueryLisData");//namespace.class
object o = System.Activator.CreateInstance(t);
System.Reflection.MethodInfo mi = t.GetMethod("方法");
string htmlstrtemp = mi.Invoke(o, new object[] { pationtid }).ToString();