Julius A Julius A - 2 months ago 17
C# Question

Using C# String.Format "{0:p0}" without the leading space before percentage sign

Using the expression

String.Format("{0:p0}",0.10) gives 10 %


How do I get this to return
10%
(without the space between 10 and %)?

Culture: en-GB

Answer

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