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<Type>

一个 ICollection<T>,它包含所引用的集合类型。

注解

默认情况下,导入集合架构时会生成一个数组(架构具有提及不同类型的特殊批注时除外)。 但是,如果 ReferencedCollectionTypes 集合中有匹配类型,则将使用该类型。 例如,导入包含一个整数列表的架构时,通常将生成一个整数数组。 但是,如果集合包含整数类型的 LinkedList<T>,则将使用该类型而不是数组。

适用于