CSharp examples for System:Converter
Convert String To Bool
using System.Threading.Tasks; using System.Text; using System.Linq; using System.Collections.Generic; using System;//from w w w. ja v a 2 s . c o m public class Main{ public static bool ConvertStringToBool(string value) { bool boolValue; if (!bool.TryParse(value, out boolValue)) { throw new Exception("String is not in the right format - Bool"); } return boolValue; } }