Get paths of assemblies used in Type

前端 未结 2 908
醉梦人生
醉梦人生 2020-12-10 06:43

I need a method that takes a Type and returns the paths of all assemblies that used in the type. I wrote this:

public static IEnumerable GetRef         


        
2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-10 07:13

    type.Assembly.GetReferencedAssemblies() will return all the assemblies that are referenced by the assembly in which the type is declared. This doesn't mean that the assemblies you will get with this function have anything in common with the given type.

提交回复
热议问题