|
-
Jun 16th, 2003, 10:57 AM
#1
Thread Starter
Frenzied Member
rounding
is there a rounding function in VB.NET?
It's tough being an unhandled exception...
___________
VB.NET 2008
VB.NET 2010
ORACLE 11g
CRYSTAL 11
-
Jun 16th, 2003, 11:03 AM
#2
Sleep mode
-
Jun 16th, 2003, 12:04 PM
#3
Thread Starter
Frenzied Member
It's tough being an unhandled exception...
___________
VB.NET 2008
VB.NET 2010
ORACLE 11g
CRYSTAL 11
-
Jun 16th, 2003, 12:40 PM
#4
Thread Starter
Frenzied Member
how would I round two decimals places? code below is giving me a syntax err...
(Math.Round,2((itemTotal + CDbl(Trim(txtItemCost.Text))))
It's tough being an unhandled exception...
___________
VB.NET 2008
VB.NET 2010
ORACLE 11g
CRYSTAL 11
-
Jun 16th, 2003, 01:06 PM
#5
Sleep mode
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
-
Jun 16th, 2003, 01:07 PM
#6
Frenzied Member
because your synatx is wrong, try this:
Math.Round(itemTotal + CDbl(Trim(txtItemCost.Text)),2)
'Heading for the automatic overload'
Marillion, Brave, The Great Escape, 1994
'How will WE stand the FIRE TOMORROW?'
Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979
-
Jun 16th, 2003, 01:08 PM
#7
Thread Starter
Frenzied Member
my total is 90.1100014 but it's rounding to 90. I need it to round to 90.11
It's tough being an unhandled exception...
___________
VB.NET 2008
VB.NET 2010
ORACLE 11g
CRYSTAL 11
-
Jun 16th, 2003, 01:11 PM
#8
Frenzied Member
arent you assigning the result to an integer or so?
'Heading for the automatic overload'
Marillion, Brave, The Great Escape, 1994
'How will WE stand the FIRE TOMORROW?'
Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979
-
Jun 16th, 2003, 01:11 PM
#9
Sleep mode
Originally posted by EyeTalion
my total is 90.1100014 but it's rounding to 90. I need it to round to 90.11
Lunatic did it for you actually .
-
Jun 16th, 2003, 01:13 PM
#10
Thread Starter
Frenzied Member
It's tough being an unhandled exception...
___________
VB.NET 2008
VB.NET 2010
ORACLE 11g
CRYSTAL 11
-
Jun 16th, 2003, 01:16 PM
#11
Frenzied Member
I wonder why Decimal.Round method is included in .NET Framework but there is no Single or Double.Round method.
'Heading for the automatic overload'
Marillion, Brave, The Great Escape, 1994
'How will WE stand the FIRE TOMORROW?'
Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|