ClassLib.User user = (ClassLib.User)Activator.CreateInstance(t.Assembly.FullName,t.FullName).Unwrap();

3,
Type type = Assembly.LoadFile(abolutePath).GetType(typeName);
return Activator.CreateInstance(type, parameters);
这样也可以使用,可以继承着使用,或者是接口来使用。只是不能转换成ClassLib.User而已。

 

相关文章:

  • 2021-08-17
  • 2022-02-19
  • 2022-12-23
  • 2021-04-06
  • 2021-08-12
  • 2021-11-11
  • 2021-06-05
  • 2022-02-19
猜你喜欢
  • 2021-06-03
  • 2022-01-24
  • 2021-08-02
  • 2021-12-17
  • 2021-12-17
  • 2021-05-15
  • 2021-10-19
相关资源
相似解决方案