TypeDescriptor::CreateProperty Method (Type^, String^, Type^, array<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)

public:
[ReflectionPermissionAttribute(SecurityAction::LinkDemand, Flags = ReflectionPermissionFlag::MemberAccess)]
static PropertyDescriptor^ CreateProperty(
	Type^ componentType,
	String^ name,
	Type^ type,
	... array<Attribute^>^ attributes
)

Parameters

componentType
Type: System::Type^

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

name
Type: System::String^

The name of the property.

type
Type: System::Type^

The Type of the property.

attributes
Type: array<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.

ReflectionPermission

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

.NET Framework
Available since 1.1
Return to top
Show: