Share via


SyntaxErrorException 构造函数

定义

初始化 SyntaxErrorException 类的新实例。

重载

SyntaxErrorException()

初始化 SyntaxErrorException 类的新实例。

SyntaxErrorException(String)

使用指定的字符串初始化 SyntaxErrorException 类的新实例。

SyntaxErrorException(SerializationInfo, StreamingContext)
已过时.

使用 SerializationInfoStreamingContext 初始化 SyntaxErrorException 类的新实例。

SyntaxErrorException(String, Exception)

使用指定的错误消息和对作为此异常原因的内部异常的引用来初始化 SyntaxErrorException 类的新实例。

SyntaxErrorException()

Source:
FilterException.cs
Source:
FilterException.cs
Source:
FilterException.cs

初始化 SyntaxErrorException 类的新实例。

public:
 SyntaxErrorException();
public SyntaxErrorException ();
Public Sub New ()

适用于

SyntaxErrorException(String)

Source:
FilterException.cs
Source:
FilterException.cs
Source:
FilterException.cs

使用指定的字符串初始化 SyntaxErrorException 类的新实例。

public:
 SyntaxErrorException(System::String ^ s);
public SyntaxErrorException (string? s);
public SyntaxErrorException (string s);
new System.Data.SyntaxErrorException : string -> System.Data.SyntaxErrorException
Public Sub New (s As String)

参数

s
String

引发异常时显示的字符串。

适用于

SyntaxErrorException(SerializationInfo, StreamingContext)

Source:
FilterException.cs
Source:
FilterException.cs
Source:
FilterException.cs

注意

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

使用 SerializationInfoStreamingContext 初始化 SyntaxErrorException 类的新实例。

protected:
 SyntaxErrorException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected SyntaxErrorException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
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
[<System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Data.SyntaxErrorException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Data.SyntaxErrorException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

参数

info
SerializationInfo

序列化或反序列化对象所需的数据。

context
StreamingContext

特定序列化流的源和目标。

属性

适用于

SyntaxErrorException(String, Exception)

Source:
FilterException.cs
Source:
FilterException.cs
Source:
FilterException.cs

使用指定的错误消息和对作为此异常原因的内部异常的引用来初始化 SyntaxErrorException 类的新实例。

public:
 SyntaxErrorException(System::String ^ message, Exception ^ innerException);
public SyntaxErrorException (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)

参数

message
String

解释异常原因的错误消息。

innerException
Exception

导致当前异常的异常;如果未指定内部异常,则是一个 null 引用(在 Visual Basic 中为 Nothing)。

适用于