Niing
14
Q:

convert string to boolean c#

 string sample = "True";
 bool myBool = bool.Parse(sample);

 ///or

 bool myBool = Convert.ToBoolean(sample);
1
bool b = str == "1";
0

New to Communities?

Join the community