Windows Dev Center

XmlSerializer.Deserialize Method (XmlReader)

Deserializes the XML document contained by the specified XmlReader.

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

Public Function Deserialize ( _
	xmlReader As XmlReader _
) As Object


Type: System.Xml.XmlReader
The XmlReader that contains the XML document to deserialize.

Return Value

Type: System.Object
The Object being deserialized.


An error occurred during deserialization. The original exception is available using the InnerException property.

Deserialization is the process of reading an instance of an XML document and constructing an object that is strongly typed to the XML Schema (XSD) of the document.

Before deserializing, an XmlSerializer must be constructed using the type of the object that is being deserialized.

The XmlReader automatically detects and uses the encoding specified by the XML document.


The XmlSerializer cannot deserialize arrays of List(Of T).

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

© 2015 Microsoft