共用方式為


RuleException 建構函式

定義

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

多載

名稱 Description
RuleException()

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

RuleException(String)

初始化類別的新實例 RuleException 並指定錯誤訊息。

RuleException(SerializationInfo, StreamingContext)

使用串行化數據,初始化 RuleException 類別的新實例。

RuleException(String, Exception)

初始化該類別的新實例RuleException,並附上指定的錯誤訊息及對導致此Exception情況的內部Exception參考。

RuleException()

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

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

備註

此建構子將新實例的屬性初始 Message 化為系統提供的訊息,描述錯誤並考量當前系統文化。

下表顯示了 的 RuleException初始屬性值。

房產 價值
InnerException 一個空參考(Nothing Visual Basic 中的 Reference)。
Message 系統提供的在地描述。

適用於

RuleException(String)

初始化類別的新實例 RuleException 並指定錯誤訊息。

public:
 RuleException(System::String ^ message);
public RuleException(string message);
new System.Workflow.Activities.Rules.RuleException : string -> System.Workflow.Activities.Rules.RuleException
Public Sub New (message As String)

參數

message
String

描述錯誤的訊息。

備註

此建構子會利用參數Message初始message化新實例的屬性。

下表顯示了 的 RuleException初始屬性值。

房產 價值
InnerException 一個空參考(Nothing Visual Basic 中的 Reference)。
Message 錯誤訊息字串。

適用於

RuleException(SerializationInfo, StreamingContext)

使用串行化數據,初始化 RuleException 類別的新實例。

protected:
 RuleException(System::Runtime::Serialization::SerializationInfo ^ serializeInfo, System::Runtime::Serialization::StreamingContext context);
protected RuleException(System.Runtime.Serialization.SerializationInfo serializeInfo, System.Runtime.Serialization.StreamingContext context);
new System.Workflow.Activities.Rules.RuleException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Workflow.Activities.Rules.RuleException
Protected Sub New (serializeInfo As SerializationInfo, context As StreamingContext)

參數

serializeInfo
SerializationInfo

SerializationInfo 個 保留了關於被拋出例外的序列化物件資料。

context
StreamingContext

the that StreamingContext 包含了關於來源或目的地的上下文資訊。

備註

此建構子在反序列化過程中被呼叫,以重建透過串流傳輸的例外物件。

適用於

RuleException(String, Exception)

初始化該類別的新實例RuleException,並附上指定的錯誤訊息及對導致此Exception情況的內部Exception參考。

public:
 RuleException(System::String ^ message, Exception ^ ex);
public RuleException(string message, Exception ex);
new System.Workflow.Activities.Rules.RuleException : string * Exception -> System.Workflow.Activities.Rules.RuleException
Public Sub New (message As String, ex As Exception)

參數

message
String

描述錯誤的訊息。

ex
Exception

Exception 就是電流 Exception 的原因。 如果參數innerException不是 null 參考(Nothing在 Visual Basic 中),電流會在處理內部 Exception 的 捕捉區塊中提高。Exception

備註

若是 Exception 因先前 Exception 事件直接拋出,應該包含對該屬性中 InnerException 先前例外的參考。 該InnerException性質回傳與傳入建構子相同的值;若該InnerException性質未提供內部Exception值,則回傳空參考(Nothing)。

下表顯示了 的 RuleException初始屬性值。

房產 價值
InnerException 內在 Exception 的參考。
Message 錯誤訊息字串。

適用於