PropertyDescriptor.CreateInstance(Type) 方法

定義

建立指定類型的執行個體。

protected:
 System::Object ^ CreateInstance(Type ^ type);
protected object CreateInstance (Type type);
protected object? CreateInstance (Type type);
member this.CreateInstance : Type -> obj
Protected Function CreateInstance (type As Type) As Object

參數

type
Type

Type,表示要建立的型別。

傳回

型別的新執行個體。

備註

CreateInstance 尋找採用指定型別的建構函式。 如果找到建構函式,則會傳入屬性的類型。

轉換器和編輯器會使用這個方法來建立元件的版本。 這個方法可讓單一元件重複使用一個以上的類型。

適用於

另請參閱