我有这行代码:奇怪解析双行为
return (this.pretWithoutDiscount/Double.Parse(UtilsStatic.getEuroValue())).ToString("N2") + "€";
在调试模式下我测试,值是:
UtilsStatic.getEuroValue()= “4.1878”
this.pretWithoutDiscount = 111.0
谁能explaing WHY:
Double.Parse(UtilsStatic.getEuroValue())= 41878.0
当它应该是4.1878?
谢谢...
PS:UtilsStatic.getEuroValue返回一个字符串。
如果使用InvariantCulture会发生什么? – 2010-05-17 20:17:35