decimal decTemp = 2.1m;Console.WriteLine(decTemp.ToString("#0.00")); //输出2.10Console.WriteLine(decTemp.ToString("#.##"));//输出2.1Console.ReadLine();