Assert.True Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
True(Boolean, String) |
Asserts that a condition is true. If the condition is false the method throws an AssertionException. |
True(Boolean) |
Asserts that a condition is true. If the condition is false the method throws an AssertionException. |
True(Boolean, String, Object[]) |
Asserts that a condition is true. If the condition is false the method throws an AssertionException. |
True(Boolean, String)
Asserts that a condition is true. If the condition is false the method throws an AssertionException.
public static void True (bool condition, string message);
static member True : bool * string -> unit
Parameters
- condition
- Boolean
The evaluated condition
- message
- String
The message to display if the condition is false
Applies to
True(Boolean)
Asserts that a condition is true. If the condition is false the method throws an AssertionException.
public static void True (bool condition);
static member True : bool -> unit
Parameters
- condition
- Boolean
The evaluated condition
Applies to
True(Boolean, String, Object[])
Asserts that a condition is true. If the condition is false the method throws an AssertionException.
public static void True (bool condition, string message, params object[] args);
static member True : bool * string * obj[] -> unit
Parameters
- condition
- Boolean
The evaluated condition
- message
- String
The message to display if the condition is false
- args
- Object[]
Arguments to be used in formatting the message