1

我正在做以下从字符串到整数的转换,

Convert.ToInt32("10D6DE", 16) -> works fine

but,

Convert.ToInt32("D0437X", 16) -> throws an format exception,
 "Additional non parsable characters at the end of string"

我不确定出了什么问题。

4

1 回答 1

2

hexdigits:从 0 到 f 或 0 到 F 的十六进制数字序列。

最后它不会解析你的 X 。

于 2014-05-03T06:10:01.157 回答