c# int convert to bool code example
Example 1: how to convert string to bool c#
string sample = "True";
bool myBool = bool.Parse(sample);
///or
bool myBool = Convert.ToBoolean(sample);
Example 2: int to bool c#
int i = 0;
bool b = Convert.ToBoolean(i);