private static readonly string AssemblyPath=ConfigurationManager.AppSettings["DAL"]; public static ERPSys.IDAL.IAdmin CreateAdmin() { string ClassNamespace = AssemblyPath ".Admin"; IDAL.IAdmin admin=ERPSys.IDAL.IAdmin)Assembly.Load(AssemblyPath).CreateInstance(ClassNamespace)); return admin; }
2 回答
Qyouu
TA贡献1786条经验 获得超11个赞
反射不成功
Assembly.Load(AssemblyPath).CreateInstance
检查assemblypath是否存在,这个asebmlby是否部署,然后查看ClassNamespace是否在该dll中包含
- 2 回答
- 0 关注
- 468 浏览
添加回答
举报
0/150
提交
取消