As John has alluded to, what you're seeing is a difference in rounding
between formatting a double value as text and multiplying by 100 and
dropping the decimals.

If you have specific rounding logic, perform it before you convert to
int.  If you want the same value that you'd see as formatted text, convert
to text first.

I would recommend something like this:

double tempAmount = objMyObject.Amount * 100.0;
uint nIntAmount = Math.Round(tempAmount);

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to