Assembly.Load("程序集名称").CreateInstance("名称空间.类名称") 实例化一个类对象
BLL.CashSuper cSuper=(BLL.CashSuper)Assembly.Load("CashAcceptSystem").CreateInstance(
CashSuper基类,CashAcceptSystem程序集,CashAcceptSystem.BLL命名空间
如CashNormal类继承CashSuper,这样实例化就可灵活控制想要实例化的类,args是传给构造函数的参数。
发表评论:
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。