This documentation is archived and is not being maintained.

NetDataContractSerializer.IsStartObject Method (XmlDictionaryReader)

Determines whether the XmlDictionaryReader is positioned on an object that can be deserialized using the specified reader.

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

public override bool IsStartObject (
	XmlDictionaryReader reader
public boolean IsStartObject (
	XmlDictionaryReader reader
public override function IsStartObject (
	reader : XmlDictionaryReader
) : boolean
Not applicable.



An XmlDictionaryReader that contains the XML to read.

Return Value

true, if the reader is at the start element of the stream to read; otherwise, false.

Exception typeCondition


the reader is set to a null reference (Nothing in Visual Basic).

The IsStartObject determines whether it can read an object by examining the name and namespace of the XML element the reader is positioned at, and comparing the values to expected name and namespace. The expected name and namespace can be set with the following: the data contract name and namespace of the type passed into the constructor, or the rootName and rootNamespace values passed into the constructor (if present).

You can set the rootName and rootNamespace in the following constructors: System.Runtime.Serialization.NetDataContractSerializer(String,String), System.Runtime.Serialization.NetDataContractSerializer(XmlDictionaryString,XmlDictionaryString), and System.Runtime.Serialization.NetDataContractSerializer(XmlDictionaryString,XmlDictionaryString,StreamingContext,Int32,Boolean,FormatterAssemblyStyle,ISurrogateSelector).

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