using System;
public class convert
{
public static void Main()
try
string str = "true";
bool bandera = System.Convert.ToBoolean(str);
Console.WriteLine("El valor de la bandera " + bandera);
}
catch (Exception ex)
Console.WriteLine("Cannot conver the value" + ex.ToString() );