GenericTypeParameterBuilder.SetCustomAttribute Metod

Definition

Anger ett anpassat attribut.

Överlagringar

Name Description
SetCustomAttribute(CustomAttributeBuilder)

Ange ett anpassat attribut med hjälp av en anpassad attributbyggare.

SetCustomAttribute(ConstructorInfo, Byte[])

Anger ett anpassat attribut med en angiven anpassad attributblob.

SetCustomAttribute(CustomAttributeBuilder)

Källa:
GenericTypeParameterBuilder.cs
Källa:
GenericTypeParameterBuilder.cs
Källa:
GenericTypeParameterBuilder.cs
Källa:
GenericTypeParameterBuilder.cs
Källa:
GenericTypeParameterBuilder.cs

Ange ett anpassat attribut med hjälp av en anpassad attributbyggare.

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)

Parametrar

customBuilder
CustomAttributeBuilder

En instans av en hjälpklass som definierar det anpassade attributet.

Undantag

customBuilder är null.

Gäller för

SetCustomAttribute(ConstructorInfo, Byte[])

Källa:
GenericTypeParameterBuilder.cs
Källa:
GenericTypeParameterBuilder.cs
Källa:
GenericTypeParameterBuilder.cs
Källa:
GenericTypeParameterBuilder.cs
Källa:
GenericTypeParameterBuilder.cs

Anger ett anpassat attribut med en angiven anpassad attributblob.

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

Parametrar

con
ConstructorInfo

Konstruktorn för det anpassade attributet.

binaryAttribute
Byte[]

En byteblob som representerar attributet.

Undantag

con är null.

-eller-

binaryAttribute är en null-referens.

Kommentarer

Information om hur du formaterar binaryAttributefinns i metadataspecifikationen i partition II i CLI-specifikationen (Common Language Infrastructure).

Gäller för