August 2001
Intermediate to advanced
656 pages
18h 5m
English
Ceiling Function
System.Math
Math.Ceiling(a)a
Use: Required
Data Type: Double
A Double containing the smallest integer greater than or equal to the
argument a.
Returns the smallest integer greater than or equal to the argument
a.
Console.WriteLine(Math.Ceiling(12.1)) ' Returns 13 Console.WriteLine(Math.Ceiling(12.5)) ' Returns 13 Console.WriteLine(Math.Ceiling(-12.5)) ' Returns -12 Console.WriteLine(Math.Ceiling(-12.8)) ' Returns -12
Because this function can only accept numeric values, you may want to
check the value you pass using the IsNumeric
function to prevent generating an error.
This is a Shared member, so it can be used without creating any objects.
The Ceiling function is new to the .NET Framework.
Read now
Unlock full access