IXmlLineInfo.LineNumber Property


Gets the current line number.

Namespace:   System.Xml
Assembly:  System.Xml (in System.Xml.dll)

int LineNumber { get; }

Property Value

Type: System.Int32

The current line number or 0 if no line information is available (for example, HasLineInfo returns false).

This property is used primarily for error reporting, but can be called at any time. The starting value is 1. Combined with LinePosition, a value of 1,1 indicates the start of a document.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top