CollectionEditor.CollectionForm.CreateInstance(Type) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立指定的集合項目類型的新實例。
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。