I need to always round up one sig digit

I need 2.32 to always round to 2.4.

Wil this work?
decimal minAllowedAmount = decimal.Round(minAmount+0.05M, 1);


Thanks.
newbiewebSr. Software EngineerAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Todd GerbertConnect With a Mentor IT ConsultantCommented:
>> Are there any uninteded consequences? Like making a number round too much?
Nope.


>> Is this consider best practice? Any other ways?
I can't be absolutely, positively, 100% certain - but I'm pretty sure (99.99%) - that's the only way to do it.
0
 
Todd GerbertConnect With a Mentor IT ConsultantCommented:
Yes, that will work.
0
 
newbiewebSr. Software EngineerAuthor Commented:
Are there any uninteded consequences? Like making a number round too much?

Is this consider best practice? Any other ways?
0
 
newbiewebSr. Software EngineerAuthor Commented:
Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.