Reputation: 9661
I'm sorry, a know that it is not sow serious ....
i want to do some operation in C#, How I can do this one ?
decimal resultTK = (42 - Convert.ToDecimal(RouteA.Text)) * 21.25 ;
lblResultA.Text = Convert.ToString(resultTK);
I have some error in Data Type !
Thanks!
Upvotes: 0
Views: 107
Reputation: 300499
You are trying to implicitly convert between decimal and double. Try:
decimal resultTK = (42 - Convert.ToDecimal(RouteA.Text)) * 21.25M;
(the M on the constant specifies that it is a decimal)
Upvotes: 3