using Assembly to create object

1.(IDAL.ISupportingData)Assembly.Load("DAL").CreateInstance("DAL.Implement.SqlServer.SupportingData");

 

The red color part ,you should write the the dll name of the project..not the namespace.

(IDAL.ISupportingData)Assembly.Load("DAL.Implement.SqlServer").CreateInstance("DAL.Implement.SqlServer.SupportingData");

 

posted @ 2009-12-25 16:56  C.fly  阅读(193)  评论(0编辑  收藏  举报