Assembly.LoadModule Method

Definition

Loads the module internal to this assembly.

Overloads

LoadModule(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.

LoadModule(String, Byte[], 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. The raw bytes representing the symbols for the module are also loaded.

LoadModule(String, Byte[])

Source:
Assembly.cs
Source:
Assembly.cs
Source:
Assembly.cs

Loads the module, internal to this assembly, with a common object file format (COFF)-based image containing an emitted module, or a resource file.

C#
public System.Reflection.Module LoadModule(string moduleName, byte[]? rawModule);
C#
public System.Reflection.Module LoadModule(string moduleName, byte[] rawModule);

Parameters

moduleName
String

The name of the module. This string must correspond to a file name in this assembly's manifest.

rawModule
Byte[]

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

Returns

The loaded module.

Implements

Exceptions

moduleName or rawModule is null.

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.

Applies to

.NET 10 ja muud versioonid
Toode Versioonid
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

LoadModule(String, Byte[], Byte[])

Source:
Assembly.cs
Source:
Assembly.cs
Source:
Assembly.cs

Loads the module, internal to this assembly, with a common object file format (COFF)-based image containing an emitted module, or a resource file. The raw bytes representing the symbols for the module are also loaded.

C#
public virtual System.Reflection.Module LoadModule(string moduleName, byte[]? rawModule, byte[]? rawSymbolStore);
C#
public virtual System.Reflection.Module LoadModule(string moduleName, byte[] rawModule, byte[] rawSymbolStore);
C#
public System.Reflection.Module LoadModule(string moduleName, byte[] rawModule, byte[] rawSymbolStore);

Parameters

moduleName
String

The name of the module. This string must correspond to a file name in this assembly's manifest.

rawModule
Byte[]

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

rawSymbolStore
Byte[]

A byte array containing the raw bytes representing the symbols for the module. Must be null if this is a resource file.

Returns

The loaded module.

Implements

Exceptions

moduleName or rawModule is null.

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.

Applies to

.NET 10 ja muud versioonid
Toode Versioonid
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1