Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有个问题
在印度尼西亚,我们通常使用 8,5 而不是 8.5,但是当我在文本框中输入 8,5 时,它的意思是 85
如何解决?只是我想用逗号改变点
您可能正在double.TryParse某处使用。切换到此重载并provider使用new CultureInfo("id-ID").
double.TryParse
provider
new CultureInfo("id-ID")
示例double.Parse:
double.Parse
double result = double.Parse("6,5", new CultureInfo("id-ID"));