dll中有个方法:
public void in()
{
MessageBox.Show( this.Test.Text);
}
外部程序动态调用的dll 但是无法取得this.Test.Text的值;
Assembly assmble = Assembly.LoadFrom("pjmb.dll");
Type tmpType = assmble.GetType("pjmb.money");
System.Reflection.MethodInfo tmpM = tmpType.GetMethod("in");
object tmpobj = Activator.CreateInstance(tmpType);
tmpM.Invoke(tmpobj,null) //无法取得值
public void in()
{
MessageBox.Show( this.Test.Text);
}
外部程序动态调用的dll 但是无法取得this.Test.Text的值;
Assembly assmble = Assembly.LoadFrom("pjmb.dll");
Type tmpType = assmble.GetType("pjmb.money");
System.Reflection.MethodInfo tmpM = tmpType.GetMethod("in");
object tmpobj = Activator.CreateInstance(tmpType);
tmpM.Invoke(tmpobj,null) //无法取得值
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货