is there a rounding function in VB.NET?
Printable View
is there a rounding function in VB.NET?
You mean this :
VB Code:
Math.Round(value)
thats the one...thanks
how would I round two decimals places? code below is giving me a syntax err...
(Math.Round,2((itemTotal + CDbl(Trim(txtItemCost.Text))))
What that number "2" is doing there ? It's making syntax error and maybe the other parts too ! Can you write an example in numbers of what you are trying to do . I'll always fail in math classes ...lol :D
because your synatx is wrong, try this:
Math.Round(itemTotal + CDbl(Trim(txtItemCost.Text)),2)
my total is 90.1100014 but it's rounding to 90. I need it to round to 90.11
arent you assigning the result to an integer or so?
Lunatic did it for you actually .:DQuote:
Originally posted by EyeTalion
my total is 90.1100014 but it's rounding to 90. I need it to round to 90.11
that worked..thanks luna
I wonder why Decimal.Round method is included in .NET Framework but there is no Single or Double.Round method. :o