TransactionException 建構函式

定義

初始化 TransactionException 類別的新執行個體。Initializes a new instance of the TransactionException class.

多載

TransactionException()

初始化 TransactionException 類別的新執行個體。Initializes a new instance of the TransactionException class.

TransactionException(String)

使用指定的訊息初始化 TransactionException 類別的新執行個體。Initializes a new instance of the TransactionException class with the specified message.

TransactionException(SerializationInfo, StreamingContext)

使用指定的序列化和資料流內容資訊,初始化 TransactionException 類別的新執行個體。Initializes a new instance of the TransactionException class with the specified serialization and streaming context information.

TransactionException(String, Exception)

使用指定的訊息和內部例外狀況初始化 TransactionException 類別的新執行個體。Initializes a new instance of the TransactionException class with the specified message and inner exception.

TransactionException()

初始化 TransactionException 類別的新執行個體。Initializes a new instance of the TransactionException class.

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

適用於

TransactionException(String)

使用指定的訊息初始化 TransactionException 類別的新執行個體。Initializes a new instance of the TransactionException class with the specified message.

public:
 TransactionException(System::String ^ message);
public TransactionException (string? message);
public TransactionException (string message);
new System.Transactions.TransactionException : string -> System.Transactions.TransactionException
Public Sub New (message As String)

參數

message
String

String,其中包含說明例外狀況發生原因的訊息。A String that contains a message that explains why the exception occurred.

適用於

TransactionException(SerializationInfo, StreamingContext)

使用指定的序列化和資料流內容資訊,初始化 TransactionException 類別的新執行個體。Initializes a new instance of the TransactionException class with the specified serialization and streaming context information.

protected:
 TransactionException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected TransactionException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Transactions.TransactionException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Transactions.TransactionException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

參數

info
SerializationInfo

SerializationInfo 物件,描述已失敗的序列化作業。A SerializationInfo object that describes a failed serialization.

context
StreamingContext

SerializationInfo 物件,描述已失敗的序列化內容。A SerializationInfo object that describes a failed serialization context.

適用於

TransactionException(String, Exception)

使用指定的訊息和內部例外狀況初始化 TransactionException 類別的新執行個體。Initializes a new instance of the TransactionException class with the specified message and inner exception.

public:
 TransactionException(System::String ^ message, Exception ^ innerException);
public TransactionException (string? message, Exception? innerException);
public TransactionException (string message, Exception innerException);
new System.Transactions.TransactionException : string * Exception -> System.Transactions.TransactionException
Public Sub New (message As String, innerException As Exception)

參數

message
String

String,其中包含說明例外狀況發生原因的訊息。A String that contains a message that explains why the exception occurred.

innerException
Exception

取得造成目前例外狀況的例外狀況執行個體。Gets the exception instance that causes the current exception. 如需詳細資訊,請參閱 InnerException 屬性 (Property)。For more information, see the InnerException property.

適用於