XmlNodeReader.get_ReadState Property
public ReadState ReadState { get; }
Gets the current state of the reader.
Syntax
public ReadState ReadState { get; }
Public ReadOnly Property ReadState As ReadState
Property Value
- Type:
- System.Xml.ReadState
- Description:
- One of the ReadState values.
Remarks
The ReadState property indicates the current position of the reader in the XML document. It can be one of the following values:
- Closed: The reader is closed.
- EndOfFile: The reader has reached the end of the document.
- Error: An error occurred while reading the document.
- Initial: The reader has been created but no data has been read yet.
- Interactive: The reader is positioned on a node and can be read.
- Reading: The reader is currently reading data.
This property is useful for determining the current status of the XML reading process and for handling potential errors or end-of-file conditions.
Note: The ReadState property is read-only. You cannot set it directly. Its value changes as you call methods like Read() or Close().
See Also
XmlNodeReader Class
System.Xml Namespace