<PackageReference Include="System.Xml.ReaderWriter" Version="4.0.11-beta-23409" />

XmlException

public class XmlException : Exception
Returns detailed information about the last exception.
public int LineNumber { get; }

Gets the line number indicating where the error occurred.

public int LinePosition { get; }

Gets the line position indicating where the error occurred.

public XmlException()

Initializes a new instance of the XmlException class.

public XmlException(string message)

Initializes a new instance of the XmlException class with a specified error message.

public XmlException(string message, Exception innerException)

Initializes a new instance of the XmlException class.

public XmlException(string message, Exception innerException, int lineNumber, int linePosition)

Initializes a new instance of the XmlException class with the specified message, inner exception, line number, and line position.