0

关于在 c# 中解析/转换/操作十六进制值的任何提示?

特别是我想将十进制整数转换为十六进制,然后输出为字符串......

4

1 回答 1

1
Int32 decValue = 42;
string hexValue = decValue.ToString("X");

Int32 decValue2 = Int32.Parse(hexValue, System.Globalization.NumberStyles.HexNumber);

看到这个帖子:

如何在 C# 中转换十六进制和十进制之间的数字?

于 2008-10-10T08:41:58.677 回答