Country settings

  • Thread starter Thread starter Patrick De Ridder
  • Start date Start date
P

Patrick De Ridder

If

a program works with decimal points
the system country setting requires commas as a decimal separator
the number of decimals = 2

then

two positions are added to the numbers when displayed

my question is

how do I stop that from happening?

Patrick.
 
Can you be more specific about what you're trying to do? If you're simply
trying to convert it to a string, then:

float x = 14.95;
string xString = x.ToString("C");

will convert the value to whatever the localized currency format is.

Pete
 
Hi Patrick,

Check out Application.CurrentCulture property.
You should assign the culture you want and it will affect the application.
 
Hi Miha,

(I think that there is a 't' missing in your web page address.)

Thank you for your reference.
It lead me to CultureInfo.CurrentUICulture Property in MSDN.

Patrick.
 
Hi Pete,

No my problem is changing the culture.
I seem to have found a lead on how to do that
(re my other response).

Thanks anyway,
Patrick.
 
Back
Top