Can I load a .NET assembly at runtime and instantiate a type knowing only the name?

后端 未结 13 2199
-上瘾入骨i
-上瘾入骨i 2020-11-22 17:21

Is it possible to instantiate an object at runtime if I only have the DLL name and the class name, without adding a reference to the assembly in the project? The class imple

相关标签:
13条回答
  • 2020-11-22 17:57

    Depending how intrinsic this kind of functionality is to your project, you might want to consider something like MEF which will take care of the loading and tying together of components for you.

    0 讨论(0)
提交回复
热议问题