XmlValidatingReader.LineNumber 属性
定义
获取当前行号。Gets the current line number.
public:
property int LineNumber { int get(); };
public int LineNumber { get; }
member this.LineNumber : int
Public ReadOnly Property LineNumber As Integer
属性值
当前行号。The current line number. 此属性的起始值为 1。The starting value for this property is 1.
实现
注解
备注
XmlValidatingReader类在 .NET Framework 2.0 中已过时。The XmlValidatingReader class is obsolete in .NET Framework 2.0. 您可以 XmlReader 使用 XmlReaderSettings 类和方法创建验证实例 Create 。You can create a validating XmlReader instance by using the XmlReaderSettings class and the Create method. 有关详细信息,请参阅 XmlReader 引用页的“备注”部分。For more information, see the Remarks section of the XmlReader reference page.
此属性最常用于错误报告,但可随时调用。This property is most commonly used for error reporting, but can be called at any time. 此属性的起始值为 1。The starting value for this property is 1. 值为 LinePosition 1,1表示文档开头。Combined with LinePosition, a value of 1,1 indicates the start of the document.