string str = string.Format(123.ToString("f2") ); // 得到: str实际值为: 123.00
string str = string.Format(%.2f ,4545.48);java的format和c的printf基本是一模一样的.