当我尝试这个时,
Decimal m = Decimal.Parse(columns[1], System.Globalization.NumberStyles.AllowHexSpecifier);
我得到一个 ArgumentException 说这个,
The number style AllowHexSpecifier is not supported on floating point data types.
和列 [1] = 4B414D000000011613C3 顺便说一句。
我做错了什么,我该如何解决?
最佳答案
Decimal
是浮点类型。尝试改用 int.Parse
。
关于c# - 如何将十六进制字符串转换为十进制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22559236/