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

原文地址:https://www.cnblogs.com/shy1766IT/p/7580775.html