I have a TextBox
in which I wanna place a number, the program is supposed to read it, by converting it into a decimal, however, after performing the needed maths with the number, if I delete it from the TextBox
, it immediatly produces an error:
Format exception was unhandled ( input string in a incorrect format)
this happens on the line on which I try to convert the text into a decimal
private void readW_TextChanged(object sender, EventArgs e)
{
string _W = readW.Text;
_Wd = Convert.ToDecimal(_W);
}