decimal d1 = 342.42M; decimal d2 = 643.00M; Console.WriteLine(d1.ToString("G0")); Console.WriteLine(d2.ToString("G0")); /* 342.42 643 请按任意键继续. . . */