This documentation is archived and is not being maintained.

XmlSyntaxException Constructor (Int32)

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

Namespace:  System.Security
Assembly:  mscorlib (in mscorlib.dll)

public XmlSyntaxException(
	int lineNumber


Type: System.Int32

The line number of the XML stream where the XML syntax error was detected.

The line number of an XML stream is updated whenever a newline character is detected. Numbering begins with 1 for the first line.

The following table shows the initial property values for an instance of XmlSyntaxException.






"Invalid syntax on line lineNumber."

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0