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

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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

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

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

Parameters

componentType
Type: System.Type

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

oldPropertyDescriptor
Type: System.ComponentModel.PropertyDescriptor

The existing property descriptor.

attributes
Type: System.Attribute[]

The new attributes for this property.

Return Value

Type: System.ComponentModel.PropertyDescriptor

A new PropertyDescriptor 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: