有关在 C# 中解析/转换/操作十六进制值的任何提示吗?
特别是我想将十进制整数转换为十六进制,然后输出为字符串......
Int32 decValue = 42;
string hexValue = decValue.ToString("X");
Int32 decValue2 = Int32.Parse(hexValue, System.Globalization.NumberStyles.HexNumber);
参见这篇文章:
C#中如何实现十六进制和十进制之间的转换? https://stackoverflow.com/questions/74148/how-to-convert-numbers-between-hex-and-decimal-in-c
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)