判斷提示指定的動作擲回泛型參數中指定的型別例外狀況。
Namespace:Microsoft.Reactive.Testing
裝配: Microsoft.Reactive.Testing (in Microsoft.Reactive.Testing.dll)
Syntax
'Declaration
Public Shared Sub Throws(Of TException As Exception) ( _
action As Action, _
message As String _
)
'Usage
Dim action As Action
Dim message As String
ReactiveAssert.Throws(action, message)
public static void Throws<TException>(
Action action,
string message
)
where TException : Exception
public:
generic<typename TException>
where TException : Exception
static void Throws(
Action^ action,
String^ message
)
static member Throws :
action:Action *
message:string -> unit when 'TException : Exception
JScript does not support generic types and methods.
類型參數
- TException
要檢查的例外狀況類型。
參數
- 動作
類型: System.Action
要執行的動作。
- message
類型: System.String
判斷提示失敗的錯誤訊息。