Guard.IsTrue Method

Definition

Overloads

IsTrue(Boolean, String)

Asserts that the input value must be true.

IsTrue(Boolean, String, String)

Asserts that the input value must be true.

IsTrue(Boolean, String)

Asserts that the input value must be true.

public static void IsTrue (bool value, string name);
static member IsTrue : bool * string -> unit
Public Shared Sub IsTrue (value As Boolean, name As String)

Parameters

value
Boolean

The input Boolean to test.

name
String

The name of the input parameter being tested.

Exceptions

Thrown if value is false.

Applies to

IsTrue(Boolean, String, String)

Asserts that the input value must be true.

public static void IsTrue (bool value, string name, string message);
static member IsTrue : bool * string * string -> unit
Public Shared Sub IsTrue (value As Boolean, name As String, message As String)

Parameters

value
Boolean

The input Boolean to test.

name
String

The name of the input parameter being tested.

message
String

A message to display if value is false.

Exceptions

Thrown if value is false.

Applies to