How to get C#.Net Assembly by name?

后端 未结 7 1504
感动是毒
感动是毒 2020-12-13 16:31

Is there something like:

AppDomain.CurrentDomain.GetAssemblyByName(\"TheAssemblyName\")

so instead of looping through AppDomain.Curre

7条回答
  •  情话喂你
    2020-12-13 17:36

    For those who just need to access the assembly's metadata (version, etc.) check out Assembly.ReflectionOnlyLoad(name), which is able to load only the metadata, possibly saving on memory and IO.

提交回复
热议问题