TypeDescriptor.CreateProperty TypeDescriptor.CreateProperty TypeDescriptor.CreateProperty TypeDescriptor.CreateProperty Method

Definition

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

Overloads

CreateProperty(Type, String, Type, Attribute[]) CreateProperty(Type, String, Type, Attribute[]) 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[]) CreateProperty(Type, PropertyDescriptor, Attribute[]) CreateProperty(Type, PropertyDescriptor, Attribute[]) 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[]) CreateProperty(Type, String, Type, Attribute[]) 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

Parameters

componentType
Type Type Type Type

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

name
String String String String

The name of the property.

type
Type Type Type Type

The Type of the property.

attributes
Attribute[]

The new attributes for this property.

Returns

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

Security

ReflectionPermission
Required to inspect non-public members of the component. Link demand access required for ReflectionPermissionFlag type MemberAccess.

See Also

CreateProperty(Type, PropertyDescriptor, Attribute[]) CreateProperty(Type, PropertyDescriptor, Attribute[]) CreateProperty(Type, PropertyDescriptor, Attribute[]) 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 Type Type Type

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

oldPropertyDescriptor
PropertyDescriptor PropertyDescriptor PropertyDescriptor PropertyDescriptor

The existing property descriptor.

attributes
Attribute[]

The new attributes for this property.

Returns

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

Security

ReflectionPermission
Required to inspect non-public members of the component. Link demand access required for ReflectionPermissionFlag type MemberAccess.

See Also

Applies to