PropertyBuilder.SetCustomAttribute Methode

Definitie

Hiermee stelt u een aangepast kenmerk in.

Overloads

Name Description
SetCustomAttribute(CustomAttributeBuilder)

Stel een aangepast kenmerk in met behulp van een opbouwfunctie voor aangepaste kenmerken.

SetCustomAttribute(ConstructorInfo, Byte[])

Stel een aangepast kenmerk in met behulp van een opgegeven aangepaste kenmerk-blob.

SetCustomAttribute(CustomAttributeBuilder)

Stel een aangepast kenmerk in met behulp van een opbouwfunctie voor aangepaste kenmerken.

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

customBuilder
CustomAttributeBuilder

Een exemplaar van een helperklasse om het aangepaste kenmerk te definiƫren.

Uitzonderingen

customBuilder is null.

als CreateType() het insluittype is aangeroepen.

Van toepassing op

SetCustomAttribute(ConstructorInfo, Byte[])

Stel een aangepast kenmerk in met behulp van een opgegeven aangepaste kenmerk-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

con
ConstructorInfo

De constructor voor het aangepaste kenmerk.

binaryAttribute
Byte[]

Een byte-blob die de kenmerken vertegenwoordigt.

Kenmerken

Uitzonderingen

con of binaryAttribute is null.

CreateType() is aangeroepen op het insluittype.

Opmerkingen

Zie de metagegevensspecificatie in Partition II van ECMA-335 Common Language Infrastructure (CLI) voor meer informatie over het opmakenbinaryAttribute.

Van toepassing op