C# 保留小数

1.

    double num = 87.434948834;
    num = Math.Round(num, 2);

 

2.

    double num = 87.434948834;
    string str = num.ToString("f2");

posted on 2015-11-16 19:01  L_Zhiwei  阅读(174)  评论(0编辑  收藏  举报