Load Method (String)
Collapse the table of content
Expand the table of content

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.

Namespace:  System.Reflection
Assembly:  mscorlib (in mscorlib.dll)

public static Assembly Load(
	string assemblyString
)

Parameters

assemblyString
Type: System.String
The long form of the assembly name.

Return Value

Type: System.Reflection.Assembly
The loaded assembly.

ExceptionCondition
ArgumentNullException

assemblyString is null.

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.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2016 Microsoft