Export (0) Print
Expand All

TypeDescriptor.CreateProperty Method (Type, String, Type, Attribute[])

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

Namespace:  System.ComponentModel
Assembly:  System (in System.dll)

[ReflectionPermissionAttribute(SecurityAction.LinkDemand, Flags = ReflectionPermissionFlag.MemberAccess)]
public static PropertyDescriptor CreateProperty(
	Type componentType,
	string name,
	Type type,
	params Attribute[] attributes


Type: System.Type

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

Type: System.String

The name of the property.

Type: System.Type

The Type of the property.

Type: System.Attribute[]

The new attributes for this property.

Return Value

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

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

© 2015 Microsoft