I'm using English Visual Studio 2008 on English Windows 7, but I'm based in the Netherlands. A lot of my programs need to read and write floating point numbers. Compared to English, the Dutch notation of numbers switches the meaning of dots and comma's (i.e. 1.001 in Dutch is a thousand and one, and 1,001 is 1 + 1/1000). I will never ever ever have to write (or read) numbers in Dutch format, but for some reason, every program I compile defaults to it, so every ToString() is wrong. This gets me every time. I know I can put this at the start of every thread:
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US");
Or replace every instance of ToString() with:
String.Format(CultureInfo.InvariantCulture, "{0:0.####},{1:0.####}", x)
But sometimes I just want to compile something to see how it works, and not make any changes. Also, I'm bound to forget about this sometimes. Is there no way to just tell C#, .NET and/or Visual Studio to just always make all my projects/programs use the English number format?