how to convert string to bool c#

C#
bool b = str == "1"; string sample = "True";
 bool myBool = bool.Parse(sample);

 ///or

 bool myBool = Convert.ToBoolean(sample);
Source

Also in C#: