Export (0) Print
Expand All

TypeBuilder.SetCustomAttribute Method

Set a custom attribute using a custom attribute builder.

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

[SecuritySafeCriticalAttribute]
public void SetCustomAttribute(
	CustomAttributeBuilder customBuilder
)

Parameters

customBuilder
Type: System.Reflection.Emit.CustomAttributeBuilder
An instance of a helper class to define the custom attribute.

ExceptionCondition
ArgumentNullException

customBuilder is null.

InvalidOperationException

For the current dynamic type, the IsGenericType property is true, but the IsGenericTypeDefinition property is false.

Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft