Лучшая практика - формат несколько валют

Со страницы владельца проекта github :

«chromedriver (.exe)» не включен в опубликованные файлы в конфигурации по умолчанию. Такое поведение является намеренным.

Если вы хотите включить «chromedriver (.exe)» в опубликованные файлы, определите _PUBLISH_CHROMEDRIVER символ компиляции.

enter image description here

ИЛИ

Определить свойство PublishChromeDriver со значением «true» в файле MSBuild (. csproj, .vbproj и т. д.), чтобы опубликовать файл драйвера.


    ...
    
      ...
      true
      ...
    
...

Примечание: свойство MSBuild всегда переопределяет условие определения символа компиляции _PUBLISH_CHROMEDRIVER

17
задан chryss 27 July 2010 в 22:41
поделиться

4 ответа

Rather than storing just the currency symbol, you could store the culture string for each currency code, so AUD --> en-AU

CultureInfo ci = new CultureInfo("en-AU");
currencyValue.ToString( "c", ci );

I'm not sure how much flexibility there is in formatting available.

Not sure if this helps:

Formatting Numeric Data for a Specific Culture

1
ответ дан 30 November 2019 в 14:33
поделиться

It sounds like you have a handle on the best practices for formatting data. If I were you I would worry less about what is technically the standard but focus more on what it is your users are accustomed to.

If you are operating in markets where users are fairly savvy about different currencies it is a very different thing than having more monocultural users. Depending on the case, you will need to design your interface in a different way.

Moreover, if your requirement is to display any currency to any locale, the ISO4217 standard is your best bet. It is what is shown at currency exchange shops across the world, on currency exchanges, invoices, etc. Otherwise, displaying currency symbols could be rather confusing to some users and the symbol by itself does not indicate what currency the amount actually is.

I would also reference the following SO questions. Not all of them directly relate to your problem, but they have very good meta discussions about the issues involved in supporting multiple currencies.

3
ответ дан 30 November 2019 в 14:33
поделиться

You could store the money value as a decimal, then append the currency symbol on the UI.

Fowler discusses the Money pattern in Patterns of Enterprise Application Architecture here: http://www.martinfowler.com/eaaCatalog/money.html

0
ответ дан 30 November 2019 в 14:33
поделиться

Я думаю, что этот вопрос является отличным и ясным ответом на вопрос, ЧТО вы должны делать

ТАК - Правильный формат валюты, когда не отображается национальная валюта культуры

И этот вопрос имеет хороший ответ КАК это сделать в C #

SO - Форматирование валюты

7
ответ дан 30 November 2019 в 14:33
поделиться
Другие вопросы по тегам:

Похожие вопросы: