// 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; class MainClass { private static void test(double x) { Console.WriteLine(x.ToString("#,0")); Console.WriteLine(x.ToString("0.##")); } public static void Main(string[] args) { test(12345); test(123.45); test(9); test(0.1); } }