Thursday, July 30, 2009

How do you multiply decimals and doubles in C#?

I've tried the following code "decimal * decimal" but of course the "decimal" were named differently, but the asterk stayed the same.


I also tried doing "decimal *=" which basicly came up with the same error

How do you multiply decimals and doubles in C#?
Convert the decimal to a double %26amp; then multiply.
Reply:it should be that the double be casted into decimal, then multiply with the other decimal, then the result is recasted back to double. Report It

Reply:Your script may require the following:





How about, trying your script with a try catch block to catch OverflowException.

sound cards

No comments:

Post a Comment