Guard.IsTrue 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
IsTrue(Boolean, String) |
Asserts that the input value must be |
IsTrue(Boolean, String, String) |
Asserts that the input value must be |
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
- 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
- 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
.