TypeDescriptor.CreateProperty Method (Type, PropertyDescriptor, Attribute[])
.NET Framework 4
Creates a new property descriptor from an existing property descriptor, using the specified existing PropertyDescriptor and attribute array.
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.PropertyDescriptorA 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.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.