I can't round up the decimal number using VB.net
i'm using Cint(12.5) this must be 13 but it is not
so i try Round(12.5) but still not roundup
what do i do?
please help!!!
Try
Math.Round(12.5)
i have tried math.round(12.5) but it didn't work. May be i have to write my own function??
use this:
math.Round(12.5,0,MidpointRounding.AwayFromZero)
i have tried math.round(12.5) but it didn't work. May be i have to write my own function??
Add .49999999 first then Int it! Assuming you want to round up to the nearest whole number.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.