views:

61

answers:

1

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 has to say about what the .Load() method was designed for; but that aside, I still want to know how to use it.

+1  A: 

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);
Hans Passant
so them details you provide for the constructor those are real details of the assembly you want to load via a AssemblyName object????if that's true? I NEED TO GIVE THAT A GO !!!
IbrarMumtaz
Not sure why you'd think it isn't true. But I certainly posted the snippet so you could try it for yourself. Yeah, give it a go.
Hans Passant