System.Reflection.Emit.AssemblyBuilder.DefineUnmanagedResource Method

Defines an unmanaged resource file for this assembly given the name of the resource file.

Syntax

public void DefineUnmanagedResource (string resourceFileName)

Parameters

resourceFileName
The name of the resource file.

Remarks

An assembly can be associated with only one unmanaged resource. This means that calling AssemblyBuilder.DefineVersionInfoResource(string, string, string, string, string) or AssemblyBuilder.DefineUnmanagedResource(Byte[]) after either one of the methods was called previously will throw the System.ArgumentException. Multiple unmanaged resources need to be merged with a tool such as the Microsoft ResMerge utility (not supplied with the common language runtime).

Note:

Starting with the net_v20sp1_long, this member no longer requires System.Security.Permissions.ReflectionPermission with the System.Security.Permissions.ReflectionPermissionFlag.ReflectionEmit flag. (See Security Issues in Reflection Emit.) To use this functionality, your application should target the net_v35_long or later.

Requirements

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