tags:

views:

67

answers:

1

Hi

I need to convert double to string with two decimal digits separated with 'dot' My concern is that dot must be always used as separator.

+8  A: 

The simplest way is to specify CultureInfo.InvariantCulture as the culture, e.g.

string text = d.ToString("N2", CultureInfo.InvariantCulture);
Jon Skeet
Thank you again, Jon.
Captain Comic
Jon, does CultureInfo.InvariantCulture assume 'dot'?
Captain Comic
@Captain Comic: Yes. For *most* purposes, you can think of the invariant culture as being pretty much US English :)
Jon Skeet