SyntaxErrorException Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the SyntaxErrorException class.
Overloads
| Name | Description |
|---|---|
| SyntaxErrorException() |
Initializes a new instance of the SyntaxErrorException class. |
| SyntaxErrorException(String) |
Initializes a new instance of the SyntaxErrorException class with the specified string. |
| SyntaxErrorException(SerializationInfo, StreamingContext) |
Initializes a new instance of the SyntaxErrorException class with the SerializationInfo and the StreamingContext. |
| SyntaxErrorException(String, Exception) |
Initializes a new instance of the SyntaxErrorException class with a specified error message and a reference to the inner exception that is the cause of this exception. |
SyntaxErrorException()
Initializes a new instance of the SyntaxErrorException class.
public:
SyntaxErrorException();
public SyntaxErrorException();
Public Sub New ()
Applies to
SyntaxErrorException(String)
Initializes a new instance of the SyntaxErrorException class with the specified string.
public:
SyntaxErrorException(System::String ^ s);
public SyntaxErrorException(string s);
new System.Data.SyntaxErrorException : string -> System.Data.SyntaxErrorException
Public Sub New (s As String)
Parameters
- s
- String
The string to display when the exception is thrown.
Applies to
SyntaxErrorException(SerializationInfo, StreamingContext)
Initializes a new instance of the SyntaxErrorException class with the SerializationInfo and the StreamingContext.
protected:
SyntaxErrorException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected SyntaxErrorException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Data.SyntaxErrorException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Data.SyntaxErrorException
Protected Sub New (info As SerializationInfo, context As StreamingContext)
Parameters
- info
- SerializationInfo
The data needed to serialize or deserialize an object.
- context
- StreamingContext
The source and destination of a specific serialized stream.
Applies to
SyntaxErrorException(String, Exception)
Initializes a new instance of the SyntaxErrorException class with a specified error message and a reference to the inner exception that is the cause of this exception.
public:
SyntaxErrorException(System::String ^ message, Exception ^ innerException);
public SyntaxErrorException(string message, Exception innerException);
new System.Data.SyntaxErrorException : string * Exception -> System.Data.SyntaxErrorException
Public Sub New (message As String, innerException As Exception)
Parameters
- message
- String
The error message that explains the reason for the exception.
- innerException
- Exception
The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.