XmlReader::ReadState Property
When overridden in a derived class, gets the state of the reader.
Assembly: System.Xml (in System.Xml.dll)
Property Value
Type: System.Xml::ReadStateOne of the enumeration values that specifies the state of the reader.
| Exception | Condition |
|---|---|
| InvalidOperationException | An XmlReader method was called before a previous asynchronous operation finished. In this case, InvalidOperationException is thrown with the message “An asynchronous operation is already in progress.” |
The ReadStateproperty has one of the following values:
Initial, when the XmlReader::Readmethod is called.
Interactive, when the XmlReader::Read method has been called, and additional methods may be called on the reader.
EndOfFile, when the end of the XML document has been reached successfully.
Closed, when the XmlReader::Close method is called.
Error, when an error is preventing the read operation from continuing.
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1