String.Format("{0:0%}", 0.10)
A more elegant solution is:
Use the NumberFormatInfo.PercentPositivePattern Property:
NumberFormatInfo numberInfo = new NumberFormatInfo();
numberInfo.PercentPositivePattern = 1;
Console.WriteLine(String.Format("{0}", 0.10.ToString("P0",numberInfo)));
4 comments:
interesting blog. It would be great if you can provide more details about it. Thanks you
Web Solutions Company
Great discussion.Thanks for creating a wonderful site.
Web Solution
Nice post, it's good to see the difficulty of getting started being recognized. Nice work!
Mobile App Development Company Indore
very interesting, good job and thanks for sharing such a good blog.
Mobile App Development in Indore
Post a Comment