Bitwise Operators
using System;
class MainClass
{
static void Main(string[] args)
{
long MyBit = 0x1;
long MyBitResult = 0;
MyBitResult = MyBit & 0x1;
Console.WriteLine(MyBitResult);
MyBitResult = MyBit | 0x2;
Console.WriteLine(MyBitResult);
MyBitResult = MyBit ^ 0x4;
Console.WriteLine(MyBitResult);
}
}
Output 1
3
5
|
HTML code for linking to this page:
Related in same category :
-
|