The problem of my code is if I put value in pay money(textbox) and I turned to zero giving me an error
System.FormatException: 'Input string was not in a correct format.'
This is my code :
private void txtPM_TextChanged(object sender, EventArgs e)
{
string fee = lblFee.Text.Trim();
string pm = txtPM.Text.Trim();
int number = Convert.ToInt32(fee);
int number2 = Convert.ToInt32(pm);
int minus = number2 - number;
txtChange.Text = minus.ToString().Trim();
}
I will put here the form
I hope you can help me thanks guys