So... I have this section of code here, everything seems perfect but when I try to run this, it gives a formatting exception handler error.
private void textBox1_TextChanged(object sender, EventArgs e)
{
if (textBox1.Text != null)
{
minusTime = Convert.ToInt32(textBox1.Text); // fix this... idk what's even wrong. Just trying to assign user input to minusTime...
}
else
{
minusTime = 0;
}
}
*Note: textbox1 is user input of an integer value. minusTime is a null integer that is to be assigned to the user input.
I've tried running this with just "Convert.ToInt32(textBox1.Text)" but it still gives me an exception saying the user inputted a wrong format... when the user input is clearly an int.