IXmlSerializable Interface

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Provides custom formatting for XML serialization and deserialization to control how your object is serialized or deserialized by the XmlSerializer.

Namespace: System.Xml.Serialization
Assembly: System.Xml (in System.Xml.dll)

Syntax

Public Interface IXmlSerializable
public interface IXmlSerializable

The IXmlSerializable type exposes the following members.

Methods

Name Description
GetSchema This method is reserved and should not be used. When implementing the IXmlSerializable interface, you should return a nullNothingnullptra null reference (Nothing in Visual Basic) reference (Nothing in Visual Basic) from this method.
ReadXml Generates an object from its XML representation.
WriteXml Converts an object into its XML representation.

Top

Remarks

To control the serialization, implement the ReadXml and WriteXml methods to control the XmlReader and XmlWriter classes used to read and write the XML.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Platforms

Windows Phone

See Also

Reference

System.Xml.Serialization Namespace