vb.net - Textbox currency several countries -
I have found that these lines of code can get the currency of Canadian .
<> dim value decimal = ourTextbox.text slow positiveValue decimal = ourTextbox.text Dynamic customCurrencyInfo CultureInfo = CultureInfo.CreateSpecificCulture ("fr-ca") as customCurrencyInfo.NumberFormat.CurrencyNegativePattern = 8 String = positiveValue.ToString ('C', customCurrencyInfo) myTextbox.text = formatString myTextbox2.text = formatStringPositive as the default formatString string as in the former = value.ToString ('C', customCurrencyInfo) dim formatStringPositive Code> output may occur;
-123,45 $ 123,45 $
But about these countries:
- Melissa <
Indonesia
Somalia / Africa
-Arabia How does your currency look on the formatting text box?
For example CreateSpecificCulture ()
different culture, name:
'Malaysia' in CultureInfo = CultureInfo.CreateSpecificCulture as dim CustomCurrencyInfo ( "I") "Indonesia" ( "as low customCurrencyInfo CultureInfo = CultureInfo.CreateSpecificCulture ID -ID ") 'African' dim customCurrencyInfo CultureInfo = CultureInfo.CreateSpecificCulture (such as" Air Force ") 'Arabian' slow customCurrencyInfo CultureInfo = CultureInfo.CreateSpecificCulture ("
In MSDN Can find the culture name list It is:
Note: Changing the information of culture not only changes the symbol of the currency, but also the decimal and the thousand divisors can change. If you want to avoid it, you can copy the current culture.
information and can simply change the currency symbol from another culture: dim customCurrencyInfo = (CultureInfo) CultureInfo.CurrentCulture.Clone (); Dim culture CultureInfo = CultureInfo.CreateSpecificCulture ( "ID-ID") as customCurrencyInfo.NumberFormat.CurrencySymbol = culture.NumberFormat.CurrencySymbol
Comments
Post a Comment