.NET 3.5 - how to change default number separator

B

bim-bom

Hi,
how to change a default number separator from a colon to comma (I have
1,23 , I want 1.23) - used in Double.ToString and Double.Parse. I can
change it by:
Application.CurrentCulture = new CultureInfo("en-US");
, but it changes many other things... I want just to change a separator.

Thanks in advance!
 
A

Arne Vajhøj

bim-bom said:
how to change a default number separator from a colon to comma (I have
1,23 , I want 1.23) - used in Double.ToString and Double.Parse. I can
change it by:
Application.CurrentCulture = new CultureInfo("en-US");
, but it changes many other things... I want just to change a separator.

double ToString has overload that takes a CultueInfo as
argument - in that case it only effects the one conversion.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top