NevSoFly
asked on
Is there a way to stop vb.net from rounding?
I have a variable in a calculation with a decimal value of 0.222222222222 the format limits this to 4 decimal places so the result should be 0.2222 but the result ends up being 0. Is there a way to make it display correctly (stop rounding)?
Can you show us some code?
CInt (0.222222222222 * 10000) / 10000
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
As It turns out one of the values was being converted into an integer as 13Shadow suggested I am going to use James' code snippet for now.