CollectionEditor.CollectionForm.CreateInstance(Type) 方法

定義

建立指定的集合項目類型的新實例。

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

參數

itemType
Type

要製作的物品類型。

傳回

指定物件的新實例,或 null 使用者選擇取消該實例的建立。

備註

若無法建立新實例,此方法會拋出例外。 如果使用者選擇取消此實例的建立,此方法會回傳 null

適用於