string.format

四舍五入

string.Format("{0:f0}",12.555)
<=>
select round(12.555,0)

去掉无效的小数

string.Format("{0:0.##}",12.550)
原文地址:https://www.cnblogs.com/coce/p/9401378.html