System.Xml.Serialization.Advanced.SchemaImporterExtension.ImportDefaultValue Method

Allows you to specify the default value for the XSD type being imported.

Syntax

public virtual System.CodeDom.CodeExpression ImportDefaultValue (string value, string type)

Parameters

value
The value found in the original XSD.
type
The XSD type name.

Returns

A System.CodeDom.CodeExpression setting the new default value.

Remarks

In order to control the generation of the code, you must use the classes found in the System.CodeDom namespace. For more information, see Using the CodeDOM and CodeDOM Quick Reference.

Requirements

Namespace: System.Xml.Serialization.Advanced
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0