ImportOptions.ReferencedCollectionTypes Egenskap

Definition

Hämtar en samling typer som representerar datakontraktssamlingar som ska refereras vid generering av kod för samlingar, till exempel listor eller ordlistor med objekt.

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)

Egenskapsvärde

En ICollection<T> som innehåller de refererade samlingstyperna.

Kommentarer

Som standard genereras en matris när du importerar ett samlingsschema (såvida inte schemat har en särskild anteckning som nämner en annan typ). Men om det finns en matchande typ i samlingen används den ReferencedCollectionTypes typen. När du till exempel importerar schema som innehåller en lista över heltal genereras normalt en matris med heltal. Men om samlingen innehåller LinkedList<T> heltal av typen används den typen i stället för matrisen.

Gäller för