ValidationException 建構函式

定義

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

多載

ValidationException()

使用預設值,初始化 ValidationException 類別的新執行個體。Initializes a new instance of the ValidationException class using default values.

ValidationException(String)

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

ValidationException(SerializationInfo, StreamingContext)

使用序列化資料,初始化 ValidationException 類別的新執行個體。Initializes a new instance of the ValidationException class with serialized data.

ValidationException(String, Exception)

使用指定的錯誤訊息以及造成此例外狀況的內部例外狀況的參考,初始化 ValidationException 類別的新執行個體。Initializes a new instance of the ValidationException class with a specified error message and a reference to the inner exception that is the cause of this exception.

ValidationException()

使用預設值,初始化 ValidationException 類別的新執行個體。Initializes a new instance of the ValidationException class using default values.

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

ValidationException(String)

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

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

參數

message
String

解釋例外狀況原因的錯誤訊息。The error message that explains the reason for the exception.

ValidationException(SerializationInfo, StreamingContext)

使用序列化資料,初始化 ValidationException 類別的新執行個體。Initializes a new instance of the ValidationException class with serialized data.

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

參數

info
SerializationInfo

SerializationInfo,包含所擲回之例外狀況的相關序列化物件資料。The SerializationInfo that holds the serialized object data about the exception being thrown.

context
StreamingContext

包含有關來源或目的端內容資訊的 StreamingContextThe StreamingContext that contains contextual information about the source or destination.

ValidationException(String, Exception)

使用指定的錯誤訊息以及造成此例外狀況的內部例外狀況的參考,初始化 ValidationException 類別的新執行個體。Initializes a new instance of the ValidationException class with a specified error message and a reference to the inner exception that is the cause of this exception.

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

參數

message
String

解釋例外狀況原因的錯誤訊息。The error message that explains the reason for the exception.

innerException
Exception

造成目前例外狀況的例外狀況,若未指定內部例外狀況,則為 null 參考 (Visual Basic 中為 Nothing)。The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.

適用於