ConstructorBuilder.SetCustomAttribute Method
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Applies a custom attribute to the constructor by using a custom attribute builder.
Namespace: System.Reflection.Emit
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public Sub SetCustomAttribute ( _
customBuilder As CustomAttributeBuilder _
)
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.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | customBuilder is nulla null reference (Nothing in Visual Basic). |
Remarks
For an example of applying a custom attribute, see the SetCustomAttribute(CustomAttributeBuilder) method overload.
Version Information
Silverlight
Supported in: 5, 4, 3
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.