ImportOptions.ReferencedCollectionTypes 屬性

定義

取得型別集合,這個型別集合表示在為集合產生程式碼時所應參考的資料合約集合,例如,項目清單或項目字典。

public:
 property System::Collections::Generic::ICollection<Type ^> ^ ReferencedCollectionTypes { System::Collections::Generic::ICollection<Type ^> ^ get(); };
public System.Collections.Generic.ICollection<Type> ReferencedCollectionTypes { get; }
member this.ReferencedCollectionTypes : System.Collections.Generic.ICollection<Type>
Public ReadOnly Property ReferencedCollectionTypes As ICollection(Of Type)

屬性值

ICollection<T>,其中包含參考的集合型別。

備註

根據預設,當匯入集合結構描述時將會產生陣列 (除非結構描述有指定不同型別的特殊附註)。 但是,如果 ReferencedCollectionTypes 集合中有存在相符的型別,這時就會使用該型別。 例如,當匯入其中包含整數清單的結構描述時,通常會產生整數陣列。 但是,如果集合包含屬於整數型別的 LinkedList<T>,這時就會使用該型別,而不使用該陣列。

適用於