tags:

views:

83

answers:

2

if i have an integer a_variable = 1.1

how do i round it up to 2?

+7  A: 

Math.Ceiling(a_variable)

Xster
Math.Floor(a_variable+1) ... : )
Norla
+2  A: 

Assuming you mean a single/double, use math.ceiling to get the next highest whole number.

BBlake