ModuleBuilder.SetCustomAttribute Methode

Definition

Wendet ein benutzerdefiniertes Attribut auf dieses Modul an.

Überlädt

Name Beschreibung
SetCustomAttribute(CustomAttributeBuilder)

Wendet ein benutzerdefiniertes Attribut auf dieses Modul mithilfe eines benutzerdefinierten Attribut-Generators an.

SetCustomAttribute(ConstructorInfo, Byte[])

Wendet ein benutzerdefiniertes Attribut auf dieses Modul mithilfe eines angegebenen binären großen Objekts (BLOB) an, das das Attribut darstellt.

SetCustomAttribute(CustomAttributeBuilder)

Wendet ein benutzerdefiniertes Attribut auf dieses Modul mithilfe eines benutzerdefinierten Attribut-Generators an.

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)

Parameter

customBuilder
CustomAttributeBuilder

Eine Instanz einer Hilfsklasse, die das anzuwendende benutzerdefinierte Attribut angibt.

Ausnahmen

customBuilder ist null.

Gilt für:

SetCustomAttribute(ConstructorInfo, Byte[])

Wendet ein benutzerdefiniertes Attribut auf dieses Modul mithilfe eines angegebenen binären großen Objekts (BLOB) an, das das Attribut darstellt.

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

Parameter

con
ConstructorInfo

Der Konstruktor für das benutzerdefinierte Attribut.

binaryAttribute
Byte[]

Ein Byte-BLOB, das das Attribut darstellt.

Attribute

Ausnahmen

con oder binaryAttribute ist null.

Hinweise

Weitere Informationen zum Formatieren binaryAttributefinden Sie in der Dokumentation zur Common Language Infrastructure (CLI), insbesondere "Partition II: Metadata Definition and Semantics". Weitere Informationen finden Sie unter ECMA 335 Common Language Infrastructure (CLI).

Gilt für: