我得到这个非常奇怪的错误,Int32.Parse错误出现FormatException
Int32.Parse("455.55"); // gives Format Exception Error
[FormatException: Input string was not in a correct format.]
System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +9586043
System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +119
System.Int32.Parse(String s) +23
值的int “455.55”不可解析为int32。你期望这会返回什么?一个等于455.55的整数? – kkm 2012-02-07 07:48:00
感谢您的答案。我的部分愚蠢的错误。 :( – pokrate 2012-02-07 09:44:22