I'm writing a program in vb.net 2008 that calculates grades and puts them in a list. When I use Math.Round it will not show two decimal places for a number without decimals. For example:
This is what I have
100
96.97
93.94
...
Is there a way to force 100 or any other number that does not have decimals to have .00 after it?
Here is what I'm using in my code now
Str(Math.Round( i + HighGrade, 2, MidpointRoundin g.AwayFromZero) ).PadLeft(4)
This is what I have
100
96.97
93.94
...
Is there a way to force 100 or any other number that does not have decimals to have .00 after it?
Here is what I'm using in my code now
Str(Math.Round( i + HighGrade, 2, MidpointRoundin g.AwayFromZero) ).PadLeft(4)
Comment