Assembly.LoadModule Method (String, Byte[])

Loads the module, internal to this assembly, with a Common Object File Format (COFF)-based image containing an emitted module, or a resource file.

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

public Module LoadModule (
	string moduleName,
	byte[] rawModule
public final Module LoadModule (
	String moduleName, 
	byte[] rawModule
public final function LoadModule (
	moduleName : String, 
	rawModule : byte[]
) : Module



Name of the module. Must correspond to a file name in this assembly's manifest.


A byte array that is a COFF-based image containing an emitted module, or a resource.

Return Value

The loaded Module.

Exception typeCondition


moduleName or rawModule is a null reference (Nothing in Visual Basic).


moduleName does not match a file entry in this assembly's manifest.


rawModule is not a valid module.


A file that was found could not be loaded.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0