Question about Assembly.Load

  • Thread starter Thread starter Lee Alexander
  • Start date Start date
L

Lee Alexander

Why does Assembly.Load allow this:

Assembly.Load( "mscorlib" );

if you try the following it fails as expected:
Assembly.Load( "System" );

Since it should be (for framework 1.1):
Assembly.Load( "System, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" );

I would have thought you would have had to do the same for mscorlib.

Assembly.Load( "mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" );



Anyone shed some light?


Regards
Lee
 
mscorlib is a special case since you can only have one version of it per
process. When your managed application is started there is already a version
of mscorlib loaded in the process, so specifying the version of mscorlib is
completely redundant information.

Thanks,
Marcelo
 
Back
Top