TypeDescriptor.CreateProperty Method

Definition

Creates a new property descriptor for an existing property of a component.

Overloads

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

Creates and dynamically binds a property descriptor to a type, using the specified property name, type, and attribute array.

CreateProperty(Type, PropertyDescriptor, Attribute[])

Creates a new property descriptor from an existing property descriptor, using the specified existing PropertyDescriptor and attribute array.

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

Creates and dynamically binds a property descriptor to a type, using the specified property name, type, and attribute array.

public:
 static System::ComponentModel::PropertyDescriptor ^ CreateProperty(Type ^ componentType, System::String ^ name, Type ^ type, ... cli::array <Attribute ^> ^ attributes);
public static System.ComponentModel.PropertyDescriptor CreateProperty (Type componentType, string name, Type type, params Attribute[] attributes);
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

Parameters

componentType
Type

The Type of the component that the property is a member of.

name
String

The name of the property.

type
Type

The Type of the property.

attributes
Attribute[]

The new attributes for this property.

Returns

PropertyDescriptor

A PropertyDescriptor that is bound to the specified type and that has the specified metadata attributes merged with the existing metadata attributes.

See also

Applies to

CreateProperty(Type, PropertyDescriptor, Attribute[])

Creates a new property descriptor from an existing property descriptor, using the specified existing PropertyDescriptor and attribute array.

public:
 static System::ComponentModel::PropertyDescriptor ^ CreateProperty(Type ^ componentType, System::ComponentModel::PropertyDescriptor ^ oldPropertyDescriptor, ... cli::array <Attribute ^> ^ attributes);
public static System.ComponentModel.PropertyDescriptor CreateProperty (Type componentType, System.ComponentModel.PropertyDescriptor oldPropertyDescriptor, params Attribute[] attributes);
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

Parameters

componentType
Type

The Type of the component that the property is a member of.

oldPropertyDescriptor
PropertyDescriptor

The existing property descriptor.

attributes
Attribute[]

The new attributes for this property.

Returns

PropertyDescriptor

A new PropertyDescriptor that has the specified metadata attributes merged with the existing metadata attributes.

See also

Applies to