说一下.net core中反射
电脑版发表于:2019/7/26 14:37
与.net的区别就在于这里用的是LoadFrom
var binPath = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location); var assembly = Assembly.LoadFrom(Path.Combine(binPath, assemblyname+ ".dll")); var pb = assembly.CreateInstance(assemblyname + ".Dal." + "UserDetailsDal") as IUserDetailsDal;