Export (0) Print
Expand All

DataContractSerializer.ReadObject Method (XmlReader, Boolean)

Reads the XML stream with an XmlReader and returns the deserialized object, and also specifies whether a check is made to verify the object name before reading its value.

Namespace: System.Runtime.Serialization
Assembly: System.Runtime.Serialization (in system.runtime.serialization.dll)

public override Object ReadObject (
	XmlReader reader,
	bool verifyObjectName
)
public Object ReadObject (
	XmlReader reader, 
	boolean verifyObjectName
)
public override function ReadObject (
	reader : XmlReader, 
	verifyObjectName : boolean
) : Object
Not applicable.

Parameters

reader

The XmlReader used to read the XML stream.

verifyObjectName

true to check whether the name of the object corresponds to the root name value supplied in the constructor; otherwise, false.

Return Value

The deserialized object.

Exception typeCondition

SerializationException

if the verifyObjectName parameter is set to true, and the element name and namespace do not correspond to the values set in the constructor.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft