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