// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.Globalization; class MainClass { public static void Main(string[] args) { double def = double.Parse("295,5"); double en = double.Parse("295.5", new CultureInfo("en-US", false)); double da = double.Parse("295,5", new CultureInfo("da-DK", false)); Console.WriteLine(def + " " + en + " " + da); double x = 295.5; Console.WriteLine(x); Console.WriteLine(x.ToString()); Console.WriteLine(x.ToString(new CultureInfo("en-US", false))); Console.WriteLine(x.ToString(new CultureInfo("da-DK", false))); } }