I'm having a little problem with formatting numbers by percentage, I have a List<decimal>
that has these elements
0.006250
0.010000
0.012500
0.016600
0.025000
0.050000
I intend to get back:
0,0625%
1%
1,25%
1,66%
2,5%
5%
I'm trying the following
NumberFormatInfo formato = new NumberFormatInfo();
formato.PercentDecimalDigits = 4;
numero.ToString("p",formato);
But in this way, I am receiving the following:
0,06250%
1,00000%
1,25000%
1,66000%
2,50000%
5,00000%
What would be the correct way to format it?