Rounding up in VB.NET
20,922
Use Math.Ceiling in order to round a number to the closest, larger, integer value:
Math.Ceiling(4.39)
As explained in the MSDN link:
"Returns the smallest integral value that is greater than or equal to the specified double-precision floating-point number."
Author by
John Nuñez
Updated on March 30, 2020Comments
-
John Nuñez about 4 years
How can I round 4.39 to 5 in VB.NET?
I tried:
Math.Round(4.39, 0)
But it displays 4.