TypeBuilder.SetCustomAttribute Metódus
Definíció
Fontos
Egyes információk olyan, kiadás előtti termékekre vonatkoznak, amelyek a kiadásig még jelentősen módosulhatnak. A Microsoft nem vállal kifejezett vagy törvényi garanciát az itt megjelenő információért.
Egyéni attribútumot állít be.
Túlterhelések
| Name | Description |
|---|---|
| SetCustomAttribute(CustomAttributeBuilder) |
Egyéni attribútum beállítása egyéni attribútumszerkesztővel. |
| SetCustomAttribute(ConstructorInfo, Byte[]) |
Egyéni attribútum beállítása egy megadott egyéni attribútumblob használatával. |
SetCustomAttribute(CustomAttributeBuilder)
- Forrás:
- TypeBuilder.cs
- Forrás:
- TypeBuilder.cs
- Forrás:
- TypeBuilder.cs
- Forrás:
- TypeBuilder.cs
- Forrás:
- TypeBuilder.cs
Egyéni attribútum beállítása egyéni attribútumszerkesztővel.
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)
Paraméterek
- customBuilder
- CustomAttributeBuilder
Egy segédosztály egy példánya, amely meghatározza az egyéni attribútumot.
Kivételek
customBuilder az null.
Az aktuális dinamikus típus esetében a IsGenericType tulajdonság az true, de a IsGenericTypeDefinition tulajdonság az false.
A következőre érvényes:
SetCustomAttribute(ConstructorInfo, Byte[])
- Forrás:
- TypeBuilder.cs
- Forrás:
- TypeBuilder.cs
- Forrás:
- TypeBuilder.cs
- Forrás:
- TypeBuilder.cs
- Forrás:
- TypeBuilder.cs
Egyéni attribútum beállítása egy megadott egyéni attribútumblob használatával.
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())
Paraméterek
- con
- ConstructorInfo
Az egyéni attribútum konstruktora.
- binaryAttribute
- Byte[]
Az attribútumokat képviselő bájtblob.
- Attribútumok
Kivételek
con vagy binaryAttribute az null.
Az aktuális dinamikus típus esetében a IsGenericType tulajdonság az true, de a IsGenericTypeDefinition tulajdonság az false.
Megjegyzések
A formátumról binaryAttributetovábbi információt az ECMA C# és a common language infrastructure standards and Standard ECMA-335 – Common Language Infrastructure (CLI) című témakörben talál.