ConfigurationErrorsException.GetLineNumber Method (XmlReader)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

This API supports the product infrastructure and is not intended to be used directly from your code.

Gets the line number within the configuration file that the internal XmlReader object was processing when this configuration exception was thrown.

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

public static int GetLineNumber(
	XmlReader reader
)

Parameters

reader
Type: System.Xml.XmlReader

The XmlReader object that caused this ConfigurationErrorsException exception to be thrown.

Return Value

Type: System.Int32

The line number within the configuration file that the XmlReader object was accessing when the exception occurred.

The GetLineNumber method returns the name of the configuration file that the XmlReader object was accessing when the exception occurred.

.NET Framework
Available since 2.0
Return to top
Show: