Visual Studio不会将我的字符串转换为十进制
错误:输入字符串的格式不正确.
码:
string test = "123.95";
decimal test1 = decimal.parse(test); // string being an int "123" doesnt cause this
Run Code Online (Sandbox Code Playgroud)
还有Convert.toDecimal(测试); 做同样的事情.
编辑:谢谢你的答案,我在网上看小数如何工作,每个人都在使用'.' 并不是 ','.对不起我和这篇文章是多么令人难以置信的愚蠢.再次感谢answeres :)