小编nai*_*shx的帖子

如何获得特定的文化货币模式

我如何获得特定文化的货币模式?

例如:

而不是使用:

string.Format("{0:c}", 345.10)
Run Code Online (Sandbox Code Playgroud)

我想用这个:

string.Format("#.##0,00 €;-#.##0,00 €", 345.10);
Run Code Online (Sandbox Code Playgroud)

但是我如何为我的应用程序需要的每种文化获得模式字符串(如"#.## 0,00€; - #.## 0,00€")?

我不能使用"{0:c}"模式,因为如果用户切换语言,则货币应该相同.

c# string format currency

21
推荐指数
2
解决办法
3万
查看次数

标签 统计

c# ×1

currency ×1

format ×1

string ×1