5
可能重复:
How do I format a double to currency rounded to the nearst dollar?在货币删除小数
如何从货币除去小数?
这是我如何格式的数字货币:
string.Format("{0:C}", Amount)
输出为$ 20,000,000.00但我需要提前$ 20,000,000
感谢
可能重复:
How do I format a double to currency rounded to the nearst dollar?在货币删除小数
如何从货币除去小数?
这是我如何格式的数字货币:
string.Format("{0:C}", Amount)
输出为$ 20,000,000.00但我需要提前$ 20,000,000
感谢
指定要零小数位:
String.Format("{0:C0}",Amount)
我相信这会回答你的问题: http://stackoverflow.com/questions/890100/how-do-i-format-a-double-to-currency-rounded-to-the-nearst-dollar – Pete
Amount.Trim('0')。修剪('。'); – Nisar