【发布时间】:2015-01-01 04:49:15
【问题描述】:
我想使用 c# 每 3 位为十进制数字添加逗号。
我写了这段代码:
double a = 0;
a = 1.5;
Interaction.MsgBox(string.Format("{0:#,###0}", a));
但它返回 2。
我哪里错了?
请描述我该如何解决?
【问题讨论】:
-
@raj:这里的答案不同。
-
@GregC 虽然,不一定更好than the one that's accepted there。 ;^)
标签: c#