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
此随笔或为自己所写、或为转载于网络。仅用于个人收集及备忘。

浙公网安备 33010602011771号