Load Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Loads an Assembly given its display name.

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

Syntax

'Declaration
Public Function Load ( _
    assemblyString As String _
) As Assembly
public Assembly Load(
    string assemblyString
)
public:
Assembly^ Load(
    String^ assemblyString
)
member Load : 
        assemblyString:string -> Assembly 
public function Load(
    assemblyString : String
) : Assembly

Parameters

Return Value

Type: System.Reflection. . :: . .Assembly
The loaded assembly.

Exceptions

Exception Condition
ArgumentNullException

assemblyString is null Nothing nullptr unit a null reference (Nothing in Visual Basic)

FileNotFoundException

assemblyString is not found.

BadImageFormatException

assemblyString is not a valid assembly.

-or-

Version 2.0 or later of the common language runtime is currently loaded and assemblyString was compiled with a later version.

AppDomainUnloadedException

The operation is attempted on an unloaded application domain.

FileLoadException

An assembly or module was loaded twice with two different evidences.

Remarks

This method should be used only to load an assembly into the current application domain. This method is provided as a convenience for interoperability callers who cannot call the static Assembly..::..Load method. To load assemblies into other application domains, use a method such as CreateInstanceAndUnwrap.

For information that is common to all overloads of this method, see the Load(AssemblyName) method overload.

.NET Framework Security

See Also

Reference

AppDomain Class

System Namespace