PropertyBuilder.SetCustomAttribute Метод
Определение
Важно!
Некоторые сведения относятся к предварительной версии продукта, в которую до выпуска могут быть внесены существенные изменения. Майкрософт не предоставляет никаких гарантий, явных или подразумеваемых, относительно приведенных здесь сведений.
Задает настраиваемый атрибут.
Перегрузки
| Имя | Описание |
|---|---|
| SetCustomAttribute(CustomAttributeBuilder) |
Задайте настраиваемый атрибут с помощью построителя настраиваемых атрибутов. |
| SetCustomAttribute(ConstructorInfo, Byte[]) |
Задайте настраиваемый атрибут с помощью указанного пользовательского blob-объекта атрибута. |
SetCustomAttribute(CustomAttributeBuilder)
- Исходный код:
- PropertyBuilder.cs
- Исходный код:
- PropertyBuilder.cs
- Исходный код:
- PropertyBuilder.cs
- Исходный код:
- PropertyBuilder.cs
- Исходный код:
- PropertyBuilder.cs
Задайте настраиваемый атрибут с помощью построителя настраиваемых атрибутов.
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)
Параметры
- customBuilder
- CustomAttributeBuilder
Экземпляр вспомогательного класса для определения пользовательского атрибута.
Исключения
customBuilder равно null.
Значение
Применяется к
SetCustomAttribute(ConstructorInfo, Byte[])
- Исходный код:
- PropertyBuilder.cs
- Исходный код:
- PropertyBuilder.cs
- Исходный код:
- PropertyBuilder.cs
- Исходный код:
- PropertyBuilder.cs
- Исходный код:
- PropertyBuilder.cs
Задайте настраиваемый атрибут с помощью указанного пользовательского 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())
Параметры
- con
- ConstructorInfo
Конструктор для пользовательского атрибута.
- binaryAttribute
- Byte[]
Байтовый большой двоичный объект, представляющий атрибуты.
- Атрибуты
Исключения
con или binaryAttribute есть null.
CreateType() вызывается для включающего типа.
Комментарии
Сведения о форматировании binaryAttributeсм. в спецификации метаданных в разделе II среды CLMA-335 (CLI).