共用方式為


Assert.IsTrue Method

Definition

Overloads

IsTrue()

Tests whether the specified condition is true and throws an exception if the condition is false.

IsTrue()

Tests whether the specified condition is true and throws an exception if the condition is false.

IsTrue()

Tests whether the specified condition is true and throws an exception if the condition is false.

public:
 static void IsTrue(Nullable<bool> condition);
public static void IsTrue (bool? condition);
static member IsTrue : Nullable<bool> -> unit
Public Shared Sub IsTrue (condition As Nullable(Of Boolean))

Exceptions

Thrown if condition is false.

Applies to

IsTrue()

Tests whether the specified condition is true and throws an exception if the condition is false.

public:
 static void IsTrue(Nullable<bool> condition, System::String ^ message, ... cli::array <System::Object ^> ^ parameters);
public static void IsTrue (bool? condition, string message, params object[] parameters);
static member IsTrue : Nullable<bool> * string * obj[] -> unit
Public Shared Sub IsTrue (condition As Nullable(Of Boolean), message As String, ParamArray parameters As Object())

Exceptions

Thrown if condition is false.

Applies to