Defines a binary large object (BLOB) that represents a manifest resource to be embedded in the dynamic assembly.
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.
This method allows you to embed a manifest resource BLOB into a dynamic assembly.
To embed a managed resource into the manifest module of a dynamic assembly or into a satellite module, use the ModuleBuilder.DefineResource(string, string) method to get a resource writer, and use the System.Resources.ResourceWriter.AddResource(string, string) method to add the resource.
To link a managed resource into a dynamic assembly, use the AssemblyBuilder.DefineResource(string, string, string, System.Reflection.ResourceAttributes) method to get a resource writer, and use the System.Resources.ResourceWriter.AddResource(string, string) method to add the linked resource.
To link a manifest resource BLOB into a dynamic assembly, use the AssemblyBuilder.AddResourceFile(string, string) method to add the linked resource.
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.