首页 > 其他分享 >String.Format(string, double)

String.Format(string, double)

时间:2022-11-08 19:04:43浏览次数:44  
标签:F0 F1 F2 String Format double 750.5 string


String.Format(string, double)

string.Format("{0:F2}", 750.5);     //750.50
string.Format("{0:F2}", 750.22); //750.22
string.Format("{0:F1}", 750.12); //750.1
string.Format("{0:F1}", 750.15); //750.2
string.Format("{0:F0}", 750.4); //750
string.Format("{0:F0}", 750.5); //751
string.Format("{0:F}", 750.5); //750.50
string.Format("{0:F}", 750.512); //750.51


标签:F0,F1,F2,String,Format,double,750.5,string
From: https://blog.51cto.com/u_13654233/5834442

相关文章