I have 2 decimal numbers:
1999,9999
1999,99
if I use function
decimal.Round(Temp, 2);
then I have these results:
2000,00
1999,99
How to make sure that even if there is 1999,999999 it will round to 1999,99 instead of 2000,00.
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to truncate digits. One way to do it is:
decimal.Truncate(<number> * 100) / 100;