ToString(“N2”)和ToString(“0.00”)之间的区别

看来N会包含数千个分隔符,而0.00则不会。

N2将以500.00的方式工作,但是当您有5000.00时,N2将显示为

5,000.00

代替

5000.00

 

If you do this instead: 0.ToString("0.##"); you get: 0

Interestingly, if you do this: 0.ToString("#.0#"); you get: .0

If you want all three digits: 0.ToString("0.00"); produces: 0.00

posted @ 2017-09-23 12:01  BloggerSb  阅读(5434)  评论(0编辑  收藏  举报