Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ModuleBuilder::SetCustomAttribute Method (CustomAttributeBuilder^)

 

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

Namespace:   System.Reflection.Emit
Assembly:  mscorlib (in mscorlib.dll)

public:
void SetCustomAttribute(
	CustomAttributeBuilder^ customBuilder
)

Parameters

customBuilder
Type: System.Reflection.Emit::CustomAttributeBuilder^

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

Exception Condition
ArgumentNullException

customBuilder is null.

System_CAPS_noteNote

Starting with the .NET Framework 2.0 Service Pack 1, this member no longer requires ReflectionPermission with the ReflectionPermissionFlag::ReflectionEmit flag. (See Security Issues in Reflection Emit.) To use this functionality, your application should target the .NET Framework 3.5 or later.

.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Return to top
Show:
© 2017 Microsoft