double类型如何保留2为小数

double d=12.2121;
string str = d.ToString("F2");

double x = 29.982;
Console.WriteLine(x.ToString(".00"));

posted @ 2013-07-31 22:56  算盘  阅读(229)  评论(0)    收藏  举报