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
[C#]
protected object CreateInstance(
 Type type
);
[C++]
protected: Object* CreateInstance(
 Type* type
);
[JScript]
protected function CreateInstance(
   type : Type
) : Object;

Parameters

type
A Type that represents the type to create.

Return Value

A new instance of the type.

Remarks

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.

Requirements

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

Show: