XsdDataContractExporter::GetSchemaType Method (Type^)
.NET Framework (current version)
Returns the XML schema type for the specified type.
Assembly: System.Runtime.Serialization (in System.Runtime.Serialization.dll)
Parameters
- type
-
Type:
System::Type^
The type to return a schema for.
| Exception | Condition |
|---|---|
| ArgumentNullException | The type argument is null. |
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.
.NET Framework
Available since 3.0
Available since 3.0
Show: