ToString("N2")
和ToString("0.00")
有什么区别?
最佳答案
来自 Standard Numeric Format Strings
The number is converted to a string of the form "-d,ddd,ddd.ddd…", where '-' indicates a negative number symbol if required, 'd' indicates a digit (0-9), ',' indicates a thousand separator between number groups, and '.' indicates a decimal point symbol.
似乎 N
将包含千位分隔符,而 0.00
不会。
关于c# - ToString ("N2") 和 ToString ("0.00") 之间的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4506323/