码迷,mamicode.com
首页 > 其他好文 > 详细

C#格式化金额

时间:2014-08-13 22:10:47      阅读:296      评论:0      收藏:0      [点我收藏+]

标签:des   style   color   os   for   ar   div   on   

c#用format把999999999格式化成999,999,999.00的格式 c#用format把普通数字格式化成金额的格式              

 

------解决方案--------------------

999999999.ToString("N")   
   // ==〉 999,999,999.00 
999999999.ToString("C")   
  //  ==〉 ¥999,999,999.00 

------解决方案-------------------- .ToString("N") ------解决方案--------------------

string.Format("{0:N}",999999999) 
string.Format("{0:C}",999999999) 

C#格式化金额,布布扣,bubuko.com

C#格式化金额

标签:des   style   color   os   for   ar   div   on   

原文地址:http://www.cnblogs.com/Laney/p/3911112.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!