XsdDataContractExporter.GetSchemaType(Type) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the XML schema type for the specified type.
public:
System::Xml::Schema::XmlSchemaType ^ GetSchemaType(Type ^ type);
public System.Xml.Schema.XmlSchemaType? GetSchemaType (Type type);
public System.Xml.Schema.XmlSchemaType GetSchemaType (Type type);
member this.GetSchemaType : Type -> System.Xml.Schema.XmlSchemaType
Public Function GetSchemaType (type As Type) As XmlSchemaType
Parameters
- type
- Type
The type to return a schema for.
Returns
An XmlSchemaType that contains the XML schema.
Exceptions
The type
argument is null
.
Remarks
The main purpose of this method is to allow anonymous types in XML schema to be represented. Because anonymous types do not have a contract name and namespace, they cannot be looked up using the GetSchemaTypeName. This method returns the XmlSchemaType definition for such types. The types for which the GetSchemaTypeName method returns a valid name, this method returns null
.
Applies to
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour