number.ToString("p") and culture

There is a leading space in en-US culture by using number.ToString("p"), to remove this leading space, use below code instead:

String.Format("{0:0%}", number)


reference:

http://stackoverflow.com/questions/6229087/using-c-sharp-string-format-0p0-without-the-leading-space-before-percentage

展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客
应支付0元
点击重新获取
扫码支付

支付成功即可阅读