ReadObject Method (XmlReader)

NetDataContractSerializer.ReadObject Method (XmlReader)


Reads the XML stream or document with an XmlDictionaryReader and returns the deserialized object.

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

public override object ReadObject(
	XmlReader reader


Type: System.Xml.XmlReader

The XmlReader used to read the XML stream or document.

Return Value

Type: System.Object

The deserialized object.

Exception Condition

the reader is set to null.

System_CAPS_security Security Note

Calling this method with untrusted data is a security risk. Call this method only with trusted data. For more information, see Untrusted Data Security Risks.

.NET Framework
Available since 3.0
Return to top
© 2015 Microsoft