System.Reflection.Emit.ModuleBuilder.DefineManifestResource Method

Defines a binary large object (BLOB) that represents a manifest resource to be embedded in the dynamic assembly.

Syntax

public void DefineManifestResource (string name, System.IO.Stream stream, System.Reflection.ResourceAttributes attribute)

Parameters

name
The case-sensitive name for the resource.
stream
A stream that contains the bytes for the resource.
attribute
An enumeration value that specifies whether the resource is public or private.

Remarks

Resources that are recorded in the assembly manifest can be managed resources or manifest resource BLOBs, and each of these can be included in the assembly either by linking or by embedding. All four scenarios are supported for dynamic assemblies.

In addition, a single Win32 resource can be attached to an assembly by using the AssemblyBuilder.DefineUnmanagedResource(string) method or the ModuleBuilder.DefineUnmanagedResource(Byte[]) method. This resource does not appear in the assembly manifest.

Requirements

Namespace: System.Reflection.Emit
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0