Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rounding Numbers
Message
From
07/05/2008 10:49:13
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
 
 
To
06/05/2008 18:13:15
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 8.0
Miscellaneous
Thread ID:
01315443
Message ID:
01315604
Views:
19
I've tried both, but neither will pad. I know I can manually pad, but I just thought there might be something built-in to do this.

>Decimal.Round() or Math.Round()?
>
>>I can't seem to find a good method for rounding and padding numbers. For example:
>>
>>1 becomes 1.00
>>2 becomes 2.00
>>1.1 becomes 1.10
>>1.123 becomes 1.12
>>1.125 becomes 1.13
>>1.126 becomes 1.13
>>
>>
>>There has to be something built-in to do this, right? Currently I am manually parsing the digits and it's painful. Decimal.Round won't pad, so 1 will stay 1, and not become 1.00.
>>
>>Thanks!
Very fitting: http://xkcd.com/386/
Previous
Reply
Map
View

Click here to load this message in the networking platform