Bewerken

Delen via


ImportOptions.ReferencedCollectionTypes Property

Definition

Gets a collection of types that represents data contract collections that should be referenced when generating code for collections, such as lists or dictionaries of items.

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)

Property Value

An ICollection<T> that contains the referenced collection types.

Remarks

By default, an array will be generated when importing a collection schema (unless the schema has a special annotation that mentions a different type). However, if there is a matching type in the ReferencedCollectionTypes collection, that type will be used. For example, when importing schema that contains a list of integers, an array of integers will normally be generated. However, if the collection contains the LinkedList<T> of type integer, that type will be used instead of the array.

Applies to