TypeDescriptor.CreateProperty Метод

Определение

Создает дескриптор свойства для существующего свойства компонента.

Перегрузки

Имя Описание
CreateProperty(Type, PropertyDescriptor, Attribute[])

Создает дескриптор свойства из существующего дескриптора свойств, используя указанный PropertyDescriptor существующий массив атрибутов.

CreateProperty(Type, String, Type, Attribute[])

Создает и динамически привязывает дескриптор свойства к типу, используя указанное имя свойства, тип и массив атрибутов.

CreateProperty(Type, PropertyDescriptor, Attribute[])

Исходный код:
TypeDescriptor.cs
Исходный код:
TypeDescriptor.cs
Исходный код:
TypeDescriptor.cs
Исходный код:
TypeDescriptor.cs
Исходный код:
TypeDescriptor.cs

Создает дескриптор свойства из существующего дескриптора свойств, используя указанный PropertyDescriptor существующий массив атрибутов.

public:
 static System::ComponentModel::PropertyDescriptor ^ CreateProperty(Type ^ componentType, System::ComponentModel::PropertyDescriptor ^ oldPropertyDescriptor, ... cli::array <Attribute ^> ^ attributes);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("PropertyDescriptor's PropertyType cannot be statically discovered.")]
public static System.ComponentModel.PropertyDescriptor CreateProperty(Type componentType, System.ComponentModel.PropertyDescriptor oldPropertyDescriptor, params Attribute[] attributes);
public static System.ComponentModel.PropertyDescriptor CreateProperty(Type componentType, System.ComponentModel.PropertyDescriptor oldPropertyDescriptor, params Attribute[] attributes);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("PropertyDescriptor's PropertyType cannot be statically discovered.")>]
static member CreateProperty : Type * System.ComponentModel.PropertyDescriptor * Attribute[] -> System.ComponentModel.PropertyDescriptor
static member CreateProperty : Type * System.ComponentModel.PropertyDescriptor * Attribute[] -> System.ComponentModel.PropertyDescriptor
Public Shared Function CreateProperty (componentType As Type, oldPropertyDescriptor As PropertyDescriptor, ParamArray attributes As Attribute()) As PropertyDescriptor

Параметры

componentType
Type

Компонент Type , в который входит свойство.

oldPropertyDescriptor
PropertyDescriptor

Существующий дескриптор свойства.

attributes
Attribute[]

Новые атрибуты этого свойства.

Возвращаемое значение

Новый PropertyDescriptor , имеющий указанные атрибуты метаданных, объединенные с существующими атрибутами метаданных.

Атрибуты

См. также раздел

Применяется к

CreateProperty(Type, String, Type, Attribute[])

Исходный код:
TypeDescriptor.cs
Исходный код:
TypeDescriptor.cs
Исходный код:
TypeDescriptor.cs
Исходный код:
TypeDescriptor.cs
Исходный код:
TypeDescriptor.cs

Создает и динамически привязывает дескриптор свойства к типу, используя указанное имя свойства, тип и массив атрибутов.

public:
 static System::ComponentModel::PropertyDescriptor ^ CreateProperty(Type ^ componentType, System::String ^ name, Type ^ type, ... cli::array <Attribute ^> ^ attributes);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("PropertyDescriptor's PropertyType cannot be statically discovered.")]
public static System.ComponentModel.PropertyDescriptor CreateProperty(Type componentType, string name, Type type, params Attribute[] attributes);
public static System.ComponentModel.PropertyDescriptor CreateProperty(Type componentType, string name, Type type, params Attribute[] attributes);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("PropertyDescriptor's PropertyType cannot be statically discovered.")>]
static member CreateProperty : Type * string * Type * Attribute[] -> System.ComponentModel.PropertyDescriptor
static member CreateProperty : Type * string * Type * Attribute[] -> System.ComponentModel.PropertyDescriptor
Public Shared Function CreateProperty (componentType As Type, name As String, type As Type, ParamArray attributes As Attribute()) As PropertyDescriptor

Параметры

componentType
Type

Компонент Type , в который входит свойство.

name
String

Название свойства.

type
Type

Свойство Type .

attributes
Attribute[]

Новые атрибуты этого свойства.

Возвращаемое значение

Объект PropertyDescriptor , привязанный к указанному типу и имеющий указанные атрибуты метаданных, объединенные с существующими атрибутами метаданных.

Атрибуты

См. также раздел

Применяется к