<PackageReference Include="System.Security.Permissions" Version="9.0.2" />

XmlSyntaxException

public sealed class XmlSyntaxException : SystemException
The exception that is thrown when there is a syntax error in XML parsing. This class cannot be inherited.

Initializes a new instance of the XmlSyntaxException class with default properties.

public XmlSyntaxException(int lineNumber)

Initializes a new instance of the XmlSyntaxException class with the line number where the exception was detected.

public XmlSyntaxException(int lineNumber, string message)

Initializes a new instance of the XmlSyntaxException class with a specified error message and the line number where the exception was detected.

public XmlSyntaxException(string message)

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

public XmlSyntaxException(string message, Exception inner)

Initializes a new instance of the XmlSyntaxException class with a specified error message and a reference to the inner exception that is the cause of this exception.