My original code snippet would not complie on VS2005, I would get casting
errors: where as this works:
double myMoney = 1200.125;
double myShares = 354.388;
decimal myTotal = 0.00m;
myTotal = Convert.ToDecimal(myMoney * myShares);
You're code also works:
myTotal = (decimal)(myPrice * myShares);
However in both cases the results are to 4 decimal places instead of 2. Any
ideas?
"Rader" <ra*******@gmail.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.com...
Hi,
myTotal = (decimal)(myPrice * myShares);
I doesnt work?