ToInt()

Converts the boolean representation to an integer.

Declaration
public static int ToInt(this bool value)
Example
false.ToInt();
true.ToInt();
Result
0
1

Last updated