Round for Decimal
Hi,
I have problem. I writed code
Decimal.Round(System.Convert.ToDecimal( 8930.305), 2)
it return 8930.30,
but
Decimal.Round(System.Convert.ToDecimal( 8930.3051), 2)
return 8930.31,
If I write in SQL
select Round(8930.305, 2) from dual;
it return 8930.31
So what can I do? I must to have same result. I thing that
Decimal.Round(System.Convert.ToDecimal( 8930.305), 2)
should return 8930.31. What can I do? I have two different result.
Please help me, Asia
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

joy.simpsonRank #4,292 · 353 pointsPosted Jan 20, 2005, 10:33 AM EST
jszym2020 pointsPosted Jan 20, 2005, 8:37 PM EST