Assembly.Load Method (String)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Loads an assembly given the long form of its name.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- assemblyString
- Type: System.String
The long form of the assembly name.
| Exception | Condition |
|---|---|
| ArgumentNullException | assemblyString is Nothing. |
| ArgumentException | assemblyString is a zero-length string. |
| FileNotFoundException | assemblyString is not found. |
| FileLoadException | A file that was found could not be loaded. |
| BadImageFormatException | assemblyString is not a valid assembly. -or- assemblyString was compiled for a later version of the common language runtime than the currently executing version. |
FileLoadException is thrown if assemblyString specifies the full assembly name, and the first assembly that matches the simple name has a different version, culture, or public key token. The loader does not continue probing for other assemblies that match the simple name.
Version Notes
Windows Phone
If you pass an invalid string to the Load method, it throws an IOException exception instead of an ArgumentException exception.