Convert.ToDouble(“4089.90”) outputs 40.899,00 why?

前端 未结 6 2136
傲寒
傲寒 2021-02-20 16:55

I am developing a software that uses number precision, but I have this problem, it happens that when I take a string to convert to double it outputs me with a different culture.

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-20 17:53

    Culture could be based on where the ASP.Net application is running, and not the client PC that is running the browser. While their desktop PC might have similar culture settings, the server may differ.

提交回复
热议问题