设置货币格式,货币符号位于前面

发布于 2024-10-02 07:32:22 字数 66 浏览 0 评论 0原文

你好 如何格式化前面带有欧元符号的货币。使用文化 fr-Fr 格式化的货币会导致末尾出现货币符号,并用逗号代替“.”。

hi
how to format the currency with euro symbols at the front. A currency formatted with culture fr-Fr results in currency symbols at the end and commas instead of "."

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

终遇你 2024-10-09 07:32:22

CultureInfo 类允许您确定此类设置。许多格式方法(例如通过IFormatProvider 参数的String.Format())采用CultureInfo 作为参数。您可以根据您的要求配置 CultureInfo 实例,例如可以使用 NumberFormat 属性设置货币符号设置。

如果您希望这些设置应用于整个用户界面,请设置 Thread.CurrentThread.CurrentCulture 和/或 Thread.CurrentThread.CurrentUICulture 属性。许多采用 CultureInfo 作为参数的方法都会采用此设置。

The CultureInfo class allows you to determine such settings. Many format methods (e.g. String.Format() through the IFormatProvider parameter) take a CultureInfo as parameter. You can configure a CultureInfo instance with your requirements, for example the currency symbol settings which you can set using the NumberFormat property.

If you want these settings to apply to the entire user interface, set the Thread.CurrentThread.CurrentCulture and/or the Thread.CurrentThread.CurrentUICulture property. This setting is picked up by many methods that take a CultureInfo as parameter.

三月梨花 2024-10-09 07:32:22

看一下 NumberFormatInfo.CurrencyPositivePattern。
这里 http://msdn .microsoft.com/en-us/library/system.globalization.numberformatinfo.currencypositivepattern(v=vs.110).aspx 是一个包含可能值的表。
NumberFormatInfo.CurrencyNegativePattern 也是如此。

Take a look at NumberFormatInfo.CurrencyPositivePattern.
Here http://msdn.microsoft.com/en-us/library/system.globalization.numberformatinfo.currencypositivepattern(v=vs.110).aspx is a table with possible values.
Same is for NumberFormatInfo.CurrencyNegativePattern.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文