TransactionException 构造函数

定义

初始化 TransactionException 类的新实例。

重载

TransactionException()

初始化 TransactionException 类的新实例。

TransactionException(String)

使用指定的消息初始化 TransactionException 类的新实例。

TransactionException(SerializationInfo, StreamingContext)
已过时.

用指定的序列化和流上下文信息初始化 TransactionException 类的新实例。

TransactionException(String, Exception)

使用指定的消息和内部异常初始化 TransactionException 类的新实例。

TransactionException()

Source:
TransactionException.cs
Source:
TransactionException.cs
Source:
TransactionException.cs

初始化 TransactionException 类的新实例。

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

适用于

TransactionException(String)

Source:
TransactionException.cs
Source:
TransactionException.cs
Source:
TransactionException.cs

使用指定的消息初始化 TransactionException 类的新实例。

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

适用于

TransactionException(SerializationInfo, StreamingContext)

Source:
TransactionException.cs
Source:
TransactionException.cs
Source:
TransactionException.cs

注意

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

用指定的序列化和流上下文信息初始化 TransactionException 类的新实例。

protected:
 TransactionException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected TransactionException (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 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
[<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.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 对象。

context
StreamingContext

描述失败的序列化上下文的 SerializationInfo 对象。

属性

适用于

TransactionException(String, Exception)

Source:
TransactionException.cs
Source:
TransactionException.cs
Source:
TransactionException.cs

使用指定的消息和内部异常初始化 TransactionException 类的新实例。

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

innerException
Exception

获取引发当前异常的异常实例。 有关更多信息,请参见 InnerException 属性。

适用于