MimerQ
asked on
Cannot implicitly convert type 'double' to 'string' (textbox.Text *= 1.25;)
In VB.NET you can write textBox.Text *= 1.25, but in C# I got this error:
Cannot implicitly convert type 'double' to 'string'
How do you multiply a textbox value with something?
Cannot implicitly convert type 'double' to 'string'
How do you multiply a textbox value with something?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
That one was silly, I fixed it with this.
eTotal.Text = Convert.ToString(Convert.ToDouble(Convert.ToDecimal(eKWUsage.ToString()) + Convert.ToDecimal(eRate.ToString())));
To convert between for example string and double, you can use these member functions of Double class:
public static double Parse(string)
public override string ToString()
Tri