工厂模式生成构造函数带参数的对象时的解决办法(Assembly.Load(path).CreateInstance)

如下,通过args来传参

object[] args=new object[3];
args[0]="";

args[2]="";

args[1]="";

return (INETweibo.INETweiboGrab)Assembly.Load(path).CreateInstance(className, true, System.Reflection.BindingFlags.Default, null, args, null, null);


posted @ 2012-02-01 10:33  爱知菜  阅读(716)  评论(0编辑  收藏  举报