Created
June 13, 2017 07:02
-
-
Save PradeepLoganathan/64048355f441ae5758e8fa1daacbf93d to your computer and use it in GitHub Desktop.
Using a binary prefix in C# 7.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
byte b1 = 0b00001111; | |
byte b2 = 0b10101010; | |
ushort s1 = 0b1111000011110000; | |
Console.WriteLine($"{b1:X}"); | |
Console.WriteLine($"{b2:X}"); | |
Console.WriteLine($"{s1:X}"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment