Share via


CollectionEditor.CreateNewItemTypes 方法

定義

取得這個集合編輯器可包含的資料型別。

protected:
 virtual cli::array <Type ^> ^ CreateNewItemTypes();
protected virtual Type[] CreateNewItemTypes ();
abstract member CreateNewItemTypes : unit -> Type[]
override this.CreateNewItemTypes : unit -> Type[]
Protected Overridable Function CreateNewItemTypes () As Type()

傳回

Type[]

這個集合可包含的資料型別陣列。

備註

您可以從 屬性擷取集合 NewItemTypes 項目的數據類型,這比這個方法快。

除了已覆寫和實作此方法的衍生類別之外,使用者不需要呼叫這個方法。

這個方法的預設實作會傳回 Type 陣列中所有集合專案的型別。

給繼承者的注意事項

必須覆寫這個方法,以支援具有多個類型的集合。 如果集合存在,這個方法的預設實作會傳回集合屬性的數據類型 Item 。 使用這個方法來覆寫預設實作。

適用於