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
Available since 2.0
Return to top
Show: