Check out example codes for "convert string to boolean c#". It will help you in understanding the concepts better.

Code Example 1

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

 ///or

 bool myBool = Convert.ToBoolean(sample);

Code Example 2

bool b = str == "1";

Learn ReactJs, React Native from akashmittal.com