convert string to boolean c#

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

 ///or

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

Also in C#: