public static void Method() { double a = 1.991; a = Math.Round(a); Console.WriteLine("a = {0}",a); Console.WriteLine("a = {0}",a.ToString("0.00")); Console.WriteLine("a = {0:N2}",1.4); }
public static void Method() { double a = 1.991; a = Math.Round(a); Console.WriteLine("a = {0}",a); Console.WriteLine("a = {0}",a.ToString("0.00")); Console.WriteLine("a = {0:N2}",1.4); }