ParameterBuilder.SetCustomAttribute Method (System.Reflection.Emit) (original) (raw)

Definition

Namespace:

System.Reflection.Emit

Assemblies:

netstandard.dll, System.Reflection.Emit.ILGeneration.dll

Assembly:

System.Reflection.Emit.ILGeneration.dll

Assembly:

mscorlib.dll

Assembly:

netstandard.dll

Package:

System.Reflection.Emit.ILGeneration v4.7.0

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Overloads

SetCustomAttribute(CustomAttributeBuilder)

Source:

ParameterBuilder.cs

Source:

ParameterBuilder.cs

Source:

ParameterBuilder.cs

Source:

ParameterBuilder.cs

Set a custom attribute using a custom attribute builder.

public:
 void SetCustomAttribute(System::Reflection::Emit::CustomAttributeBuilder ^ customBuilder);
public void SetCustomAttribute(System.Reflection.Emit.CustomAttributeBuilder customBuilder);
member this.SetCustomAttribute : System.Reflection.Emit.CustomAttributeBuilder -> unit
Public Sub SetCustomAttribute (customBuilder As CustomAttributeBuilder)

Parameters

Exceptions

Applies to

SetCustomAttribute(ConstructorInfo, Byte[])

Source:

ParameterBuilder.cs

Source:

ParameterBuilder.cs

Source:

ParameterBuilder.cs

Source:

ParameterBuilder.cs

Set a custom attribute using a specified custom attribute blob.

public:
 void SetCustomAttribute(System::Reflection::ConstructorInfo ^ con, cli::array <System::Byte> ^ binaryAttribute);
public void SetCustomAttribute(System.Reflection.ConstructorInfo con, byte[] binaryAttribute);
[System.Runtime.InteropServices.ComVisible(true)]
public void SetCustomAttribute(System.Reflection.ConstructorInfo con, byte[] binaryAttribute);
member this.SetCustomAttribute : System.Reflection.ConstructorInfo * byte[] -> unit
[<System.Runtime.InteropServices.ComVisible(true)>]
member this.SetCustomAttribute : System.Reflection.ConstructorInfo * byte[] -> unit
Public Sub SetCustomAttribute (con As ConstructorInfo, binaryAttribute As Byte())

Parameters

binaryAttribute

Byte[]

A byte blob representing the attributes.

Attributes

Exceptions

con or binaryAttribute is null.

Remarks

For information on how to format binaryAttribute, see the metadata specification in Partition II of the Common Language Infrastructure (CLI) specification.

Applies to