bools strings C# 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: convert string to boolean c#
bool b = str == "1";
string sample = "True";
bool myBool = bool.Parse(sample);
///or
bool myBool = Convert.ToBoolean(sample);
bool b = str == "1";