This documentation is archived and is not being maintained.

PropertyDescriptor.CreateInstance Method

Creates an instance of the specified type.

[Visual Basic]
Protected Function CreateInstance( _
   ByVal type As Type _
) As Object
protected object CreateInstance(
 Type type
protected: Object* CreateInstance(
 Type* type
protected function CreateInstance(
   type : Type
) : Object;


A Type that represents the type to create.

Return Value

A new instance of the type.


CreateInstance looks for a constructor that takes the specified type. If it finds a constructor, the type of the property is passed in.

Converters and editors use this method to create versions of a component. This method enables a single component to be reused for more than one type.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

PropertyDescriptor Class | PropertyDescriptor Members | System.ComponentModel Namespace | TypeConverter | UITypeEditor