XmlSerializer.Deserialize Method (XmlReader)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Deserializes the XML document contained by the specified XmlReader.
Assembly: System.Xml.Serialization (in System.Xml.Serialization.dll)
Parameters
- xmlReader
- Type: System.Xml.XmlReader
The XmlReader that contains the XML document to deserialize.
| Exception | Condition |
|---|---|
| InvalidOperationException | 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.
Note: |
|---|
The XmlSerializer cannot deserialize arrays of List<T>. |
Note: