开发者

How can the AssemblyName class be used for existing Assemblies?

开发者 https://www.devze.com 2022-12-29 05:10 出处:网络
This is another exam related question. How can I use the AssemblyName class to represent an existing assembly that already exists on disk?

This is another exam related question.

How can I use the AssemblyName class to represent an existing assembly that already exists on disk?

I am talking about from the perspective of using the AppDomain's instance method .Load() that takes an AssemblyName object as a parameter. I know what MSDN ha开发者_StackOverflow社区s to say about what the .Load() method was designed for; but that aside, I still want to know how to use it.


Not sure I see the question. But yeah, that can work:

  var name = new AssemblyName("System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
  var asm = Assembly.Load(name);
0

精彩评论

暂无评论...
验证码 换一张
取 消