ParameterBuilder.SetCustomAttribute Metodo

Definizione

Imposta un attributo personalizzato.

Overload

Nome Descrizione
SetCustomAttribute(CustomAttributeBuilder)

Impostare un attributo personalizzato usando un generatore di attributi personalizzato.

SetCustomAttribute(ConstructorInfo, Byte[])

Impostare un attributo personalizzato usando un BLOB di attributi personalizzato specificato.

SetCustomAttribute(CustomAttributeBuilder)

Impostare un attributo personalizzato usando un generatore di attributi personalizzato.

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)

Parametri

customBuilder
CustomAttributeBuilder

Istanza di una classe helper per definire l'attributo personalizzato.

Eccezioni

customBuilder è null.

Si applica a

SetCustomAttribute(ConstructorInfo, Byte[])

Impostare un attributo personalizzato usando un BLOB di attributi personalizzato specificato.

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())

Parametri

con
ConstructorInfo

Costruttore per l'attributo personalizzato.

binaryAttribute
Byte[]

BLOB di byte che rappresenta gli attributi.

Attributi

Eccezioni

con o binaryAttribute è null.

Commenti

Per informazioni su come formattare binaryAttribute, vedere la specifica dei metadati in Partition II della specifica Common Language Infrastructure (CLI).

Si applica a