共用方式為


Throws.InstanceOf 方法

定義

多載

InstanceOf(Type)

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

InstanceOf<T>()

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

InstanceOf(Type)

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

public static NUnit.Framework.Constraints.InstanceOfTypeConstraint InstanceOf(Type expectedType);
static member InstanceOf : Type -> NUnit.Framework.Constraints.InstanceOfTypeConstraint

參數

expectedType
Type

傳回

適用於

InstanceOf<T>()

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

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

類型參數

T

傳回

適用於