XmlReader.ReadState 属性
定义
当在派生类中被重写时,获取读取器的状态。When overridden in a derived class, gets the state of the reader.
public:
abstract property System::Xml::ReadState ReadState { System::Xml::ReadState get(); };
public abstract System.Xml.ReadState ReadState { get; }
member this.ReadState : System.Xml.ReadState
Public MustOverride ReadOnly Property ReadState As ReadState
属性值
指定读取器的状态的枚举值之一。One of the enumeration values that specifies the state of the reader.
例外
在上一次异步操作完成之前调用了 XmlReader 方法。An XmlReader method was called before a previous asynchronous operation finished. 在此情况下,会引发 InvalidOperationException 并显示消息“异步操作已在进行中。”In this case, InvalidOperationException is thrown with the message "An asynchronous operation is already in progress."
注解
该 ReadState 属性具有以下值之一:The ReadState property has one of the following values:
Initial如果 XmlReader.Read 调用方法,则为。Initial, when the XmlReader.Read method is called.
Interactive如果调用了 XmlReader.Read 方法,则可以在读取器上调用其他方法。Interactive, when the XmlReader.Read method has been called, and additional methods may be called on the reader.
EndOfFile如果已成功到达 XML 文档的末尾,则为。EndOfFile, when the end of the XML document has been reached successfully.
Closed如果 XmlReader.Close 调用方法,则为。Closed, when the XmlReader.Close method is called.
Error如果错误导致读取操作无法继续,则为。Error, when an error is preventing the read operation from continuing.