A1VBCode Forums
Home
»
.NET Programming
»
Visual Basic .NET
how to check for number after the decimal point
http://www.a1vbcode.com/vbforums/Topic32105.aspx
By WestSideRailways
-
11/29/2013
Hi everyone,
Sorry if this has been asked before..
Not sure how to ask about this....
A = 1.005 / A= 1.450 / A= 1.670
the above are examples hehehe
if A <= .50 then A=1
if A> .50 then A=2
hope you get my drift....
am not sure how to go about this in code
Thanks for reading......
By Mark
-
11/29/2013
Does the Round Function do what you need?
A = Math.Round(A, System.MidpointRounding.AwayFromZero)