If you have the number 28 and you want to display it as 28.00 here’s
how you can format it:
int val = 28; string formatted = val.ToString(“N2”); |
Of course, if you want to format it to 5 decimal places just use ToString(“N5”) instead.
If you have the number 28 and you want to display it as 28.00 here’s
how you can format it:
int val = 28; string formatted = val.ToString(“N2”); |
Of course, if you want to format it to 5 decimal places just use ToString(“N5”) instead.