https://zhidao.baidu.com/question/537686608.html
1、num.ToString("#0.00"); //点后面几个0就保留几位
2、num.ToString("f2"); //fN 保留N位,四舍五入,"F","f" 不区分大小写
3、Math.Round(i,2); //不精确,不推荐,例如Math.Round((double)3 / 11, 5);
https://zhidao.baidu.com/question/537686608.html
1、num.ToString("#0.00"); //点后面几个0就保留几位
2、num.ToString("f2"); //fN 保留N位,四舍五入,"F","f" 不区分大小写
3、Math.Round(i,2); //不精确,不推荐,例如Math.Round((double)3 / 11, 5);
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。