Doug <dn******@dtgnet.comwrote:
You'd have to put an M behind 10.25 and 0.00 in this situation too.
But, your other problem is that DotNet doesn't allow you to multiple a
decimal and a double together (as to why, I'm not sure).
Here's the reason, from the C# 2.0 spec:
<quote>
The decimal type has greater precision but may have a smaller range
than the floating-point types. Thus, conversions from the floating-
point types to decimal might produce overflow exceptions, and
conversions from decimal to the floating-point types might cause loss
of precision or overflow exceptions. For these reasons, no implicit
conversions exist between the floating-point types and decimal, and
without explicit casts, a compile-time error occurs when floating-point
and decimal operands are directly mixed in the same expression.
</quote>
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog:
http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too