System.Reflection.Emit.ModuleBuilder.SetCustomAttribute Method

Applies a custom attribute to this module by using a custom attribute builder.

Syntax

public void SetCustomAttribute (CustomAttributeBuilder customBuilder)

Parameters

customBuilder
An instance of a helper class that specifies the custom attribute to apply.

Remarks

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