Mega Code Archive

 
Categories / C# / Language Basics
 

Logical and and bitwise and

using System; class BitwiseAnd {     static void Main()     {         Console.WriteLine(true & false); // logical and         Console.WriteLine(true & true);  // logical and         Console.WriteLine("0x{0:x}", 0xf8 & 0x3f);  // bitwise and     } }