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
)
public XmlSyntaxException (
	int lineNumber
)
public function XmlSyntaxException (
	lineNumber : int
)

Parameters

lineNumber

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.

Property

Value

InnerException

a null reference (Nothing in Visual Basic).

Message

"Invalid syntax on line lineNumber."

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

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

.NET Framework

Supported in: 2.0, 1.1, 1.0
Show: