摘要: 学习三层结构,想用反射,结果单个文件里可以实现,拆成三个项目就出错,在web和DAL两个项目里都添加了BLL引用,下面是代码,还请多多指教!namespace BLL{ public class CarFactory { public static ICar BuildCar() { BLL.ICar myCar = null; try { Type type = Type.GetType("DAL.Bus", true); myCar = (ICar)Activator.CreateInstance(type); } catch (TypeLoadException e) 阅读全文
posted @ 2012-09-27 10:45 做个好男人 阅读(370) 评论(1) 推荐(0) 编辑