decimal.ToString("#0.00")与decimal.ToString("#.##")的区别
decimal
decTemp = 2.1m;
Console.WriteLine(decTemp.ToString(
"#0.00"
));
//输出2.10
Console.WriteLine(decTemp.ToString(
"#.##"
));
//输出2.1
Console.ReadLine();
社会阅历和生活实践少了,容易钻入空洞和抽象理论的漩涡
decimal
decTemp = 2.1m;
Console.WriteLine(decTemp.ToString(
"#0.00"
));
//输出2.10
Console.WriteLine(decTemp.ToString(
"#.##"
));
//输出2.1
Console.ReadLine();