Resolve Type from Class Name in a Different Assembly

后端 未结 6 920
轮回少年
轮回少年 2020-11-27 17:32

I have a method where I need to resolve the Type of a class. This class exists in another assembly with the namespace similar to:

MyProject.Domain.Model
         


        
6条回答
  •  無奈伤痛
    2020-11-27 17:49

    First load the assembly and then the type. ex: Assembly DLL = Assembly.LoadFile(PATH); DLL.GetType(typeName);

提交回复
热议问题