ToString(“N2”)和ToString(“0.00”)之间的差异 [英] Difference between ToString("N2") and ToString("0.00")
本文介绍了ToString(“N2”)和ToString(“0.00”)之间的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
ToString(N2)
和 ToString(0.00)
? p>
What is the difference between ToString("N2")
and ToString("0.00")
?
推荐答案
数字转换为一个字符串
形式为 -d,ddd,ddd.ddd ...,其中' - '
表示如果需要
为负数,'d'表示数字(0-9),
','表示数字组之间的分隔符
,'。'
表示小数点符号。
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
不会。
It would seem that N
will include thousands separators, whereas 0.00
will not.
另请参阅自定义数字格式字符串
这篇关于ToString(“N2”)和ToString(“0.00”)之间的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文