Last active
October 27, 2015 01:40
-
-
Save FrankFan/c5869b17a806ddb82a73 to your computer and use it in GitHub Desktop.
C#进制转换代码
This file contains hidden or 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
//十进制转二进制 | |
Console.WriteLine(Convert.ToString(69, 2)); | |
//十进制转八进制 | |
Console.WriteLine(Convert.ToString(69, 8)); | |
//十进制转十六进制 | |
Console.WriteLine(Convert.ToString(69, 16)); | |
//二进制转十进制 | |
Console.WriteLine(Convert.ToInt32("100111101", 2)); | |
//八进制转十进制 | |
Console.WriteLine(Convert.ToInt32("76", 8)); | |
//十六进制转十进制 | |
Console.WriteLine(Convert.ToInt32("FF", 16)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
32进制, 64进制???