string.format

string.Format("{0:#,0}", c.num), //千分号,有小数就保留2位小数

string.Format("{0:N2}", c.amount),//千分号,保留2位小数{0:N} 默认保留2位

string.Format("{0:P}", c.prop),//百分比保留2位小数,四舍五入显示 0.561 => 56.10%

string.Format("{0:C}", c.rmb),//人民币显示 ¥2.01

原文地址:https://www.cnblogs.com/ziye/p/3499411.html