Share via


SyntaxErrorException 建構函式

定義

初始化 SyntaxErrorException 類別的新執行個體。

多載

SyntaxErrorException()

初始化 SyntaxErrorException 類別的新執行個體。

SyntaxErrorException(String)

使用指定的字串,初始化 SyntaxErrorException 類別的新執行個體。

SyntaxErrorException(SerializationInfo, StreamingContext)
已淘汰.

使用 SyntaxErrorExceptionSerializationInfo,初始化 StreamingContext 類別的新執行個體。

SyntaxErrorException(String, Exception)

使用指定的錯誤訊息以及造成此例外狀況的內部例外狀況的參考,初始化 SyntaxErrorException 類別的新執行個體。

SyntaxErrorException()

來源:
FilterException.cs
來源:
FilterException.cs
來源:
FilterException.cs

初始化 SyntaxErrorException 類別的新執行個體。

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

適用於

SyntaxErrorException(String)

來源:
FilterException.cs
來源:
FilterException.cs
來源:
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)

來源:
FilterException.cs
來源:
FilterException.cs
來源:
FilterException.cs

警告

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

使用 SyntaxErrorExceptionSerializationInfo,初始化 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);
[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)

來源:
FilterException.cs
來源:
FilterException.cs
來源:
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)。

適用於