Export (0) Print
Expand All

ConfigurationErrorsException.Line Property

Gets the line number within the configuration file at which this configuration exception was thrown.

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

public override int Line { get; }

Property Value

Type: System.Int32
The line number within the configuration file at which this ConfigurationErrorsException exception was thrown.

The following code example shows how to get the Line property value.

int lineNumber = err.Line;
Console.WriteLine("Line: {0}", lineNumber.ToString());

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft