Mega Code Archive

 
Categories / C# / Data Types
 

Byte value binary and operation

using System; using System.Globalization; public class Example {    public static void Main()    {       byte mask = 0xFE;       Byte byteValue = Byte.Parse("12");       Console.WriteLine("{0} And {1} = {2}", byteValue, mask,  byteValue & mask);    } }