Multiplying Decimals
- From: "Kuldeep" <kuldeep.vijaykumar@xxxxxxxxxxx>
- Date: Thu, 25 Oct 2007 12:42:07 +0530
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
.
- Follow-Ups:
- Re: Multiplying Decimals
- From: Kuldeep
- Re: Multiplying Decimals
- From: Jon Skeet [C# MVP]
- Re: Multiplying Decimals
- Prev by Date: DataGridView.SelectedCells returning the Cell/Index in the Unsorted Datatable
- Next by Date: Re: Which design pattern is good for this?
- Previous by thread: DataGridView.SelectedCells returning the Cell/Index in the Unsorted Datatable
- Next by thread: Re: Multiplying Decimals
- Index(es):