共用方式為


Throws.TypeOf 方法

定義

多載

TypeOf(Type)

建立條件約束,指定預期的確切例外狀況類型

TypeOf<T>()

建立條件約束,指定預期的確切例外狀況類型

TypeOf(Type)

建立條件約束,指定預期的確切例外狀況類型

public static NUnit.Framework.Constraints.ExactTypeConstraint TypeOf(Type expectedType);
static member TypeOf : Type -> NUnit.Framework.Constraints.ExactTypeConstraint

參數

expectedType
Type

傳回

適用於

TypeOf<T>()

建立條件約束,指定預期的確切例外狀況類型

public static NUnit.Framework.Constraints.ExactTypeConstraint TypeOf<T>();
static member TypeOf : unit -> NUnit.Framework.Constraints.ExactTypeConstraint

類型參數

T

傳回

適用於