题
在c#中解析/转换/操作十六进制值的任何提示?
特别是我想将十进制int转换为十六进制,然后输出为字符串...
解决方案
Int32 decValue = 42;
string hexValue = decValue.ToString("X");
Int32 decValue2 = Int32.Parse(hexValue, System.Globalization.NumberStyles.HexNumber);
见这篇文章:
不隶属于 StackOverflow
题
在c#中解析/转换/操作十六进制值的任何提示?
特别是我想将十进制int转换为十六进制,然后输出为字符串...
解决方案
Int32 decValue = 42;
string hexValue = decValue.ToString("X");
Int32 decValue2 = Int32.Parse(hexValue, System.Globalization.NumberStyles.HexNumber);
见这篇文章: