Converts Boolean value to byte.
using System; public class MainClass { public static void Main() { bool falseFlag = false; bool trueFlag = true; Console.WriteLine("{0} converts to {1}.", falseFlag,Convert.ToByte(falseFlag)); Console.WriteLine("{0} converts to {1}.", trueFlag, Convert.ToByte(trueFlag)); } }