string.Format("{0:F2}",temp);
转载于:https://www.cnblogs.com/ANLOG/archive/2012/07/26/2610213.html
本文介绍了一种使用string.Format方法来格式化浮点数的技巧,具体展示了如何将一个浮点数temp精确到小数点后两位进行显示。
string.Format("{0:F2}",temp);
转载于:https://www.cnblogs.com/ANLOG/archive/2012/07/26/2610213.html

被折叠的 条评论
为什么被折叠?