Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.
Use C# to turn on the 4th and 7th bits
Answer
[Flags]
enum BitFlags : byte
{
One = (1 << 0),
Two = (1 << 1),
Three = (1 << 2),
Four = (1 << 3),
Five = (1 << 4),
Six = (1 << 5),
Seven = (1 << 6),
Eight = (1 << 7)
}
BitFlags myFlag = BitFlags.Four | BitFlags.Seven;
Console.WriteLine(Convert.ToString((byte)myFlag, 2));
Profile Answers by annadm Questions by annadm
Questions by annadm
This Question is not yet answered!
Related Answered Questions
Related Open Questions