将十进制转换为没有小数点的货币值 [英] Converting decimal to currency value without decimal points
本文介绍了将十进制转换为没有小数点的货币值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们如何将十进制转换为带小数点的货币值?
我使用以下内容转换为货币值.4
decimalVar.ToString(C ,新的CultureInfo(en-SG));
即使我尝试将小数转换为Int并使用上述但它返回带小数点的值,例如: $ 2344.00。
How do we covert the Decimal to the currency value with out decimal points?
I use the following to convert to currency value.4
decimalVar.ToString("C",new CultureInfo("en-SG"));
Even I try converting the decimal to Int and use the above but it returns the value with decimal points eg:$2344.00.
推荐答案
2344.00。
您好Prasaad,试试这个;
Hi Prasaad, try this;
string.Format(new CultureInfo("en-SG", false), "{0:c0}", 123423.083234);
它会将123423.083234转换为
It will convert 123423.083234 to
1,23,423格式。
i希望这对你有帮助,如果有任何查询意味着让我知道。
1,23,423 format.
i hope this will help you, If any query means let me know.
这篇关于将十进制转换为没有小数点的货币值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文