Multiplying Decimals

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi All,

I have this piece of code shown below:

decimal ft = Convert.ToDecimal(txtft.Text);

decimal inch = Convert.ToDecimal(txtin.Text);

decimal metre = ((ft * 12) + inch) * 0.0254;

When I run this, I get the follwing error:

Error 1 Operator '*' cannot be applied to operands of type 'decimal' and
'double'

How do I get this done?

Thanks,

Kuldeep






.