- 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));
- }
This code will help you to convert Boolean value to byte in c#.net.
