C#double保留两位小数

   public static void Main(string[] args)

        {

            double db = Math.PI;

            db = Math.Round(db,2);

            Console.WriteLine(db);

            Console.ReadKey();

        }

 

你可能感兴趣的:(double)