ParserError.Line Property

Definition

Gets or sets the line number of the source at which the error occurs.

C#
public int Line { get; set; }

Property Value

The source line number where the parser encountered the error.

Examples

The following code example demonstrates how to populate the Line property for a ParserError object.

C#
MyParserError.Line = 5;

Remarks

The Line property is the line number within the file at which this ParserError object was thrown.

Applies to

Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1