指定した型のインスタンスを作成します。
Protected Function CreateInstance( _
ByVal type As Type _) As Object
[C#]
protected object CreateInstance(Typetype);
[C++]
protected: Object* CreateInstance(Type* type);
[JScript]
protected function CreateInstance(
type : Type) : Object;
パラメータ
- type
作成する型を表す Type 。
戻り値
指定した型の新しいインスタンス。
解説
CreateInstance は、指定した型をとるコンストラクタを検索します。該当するコンストラクタが見つかった場合は、プロパティの型が渡されます。
コンバータとエディタは、このメソッドを使用してさまざまな型のコンポーネントを作成します。このメソッドを使用すると、1 つのコンポーネントを再利用して、複数の型のコンポーネントを作成できます。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
PropertyDescriptor クラス | PropertyDescriptor メンバ | System.ComponentModel 名前空間 | TypeConverter | UITypeEditor