private void textBox10_TextChanged(object sender, EventArgs e)
{
int n1, n2, n3, n4, n5,sum;
n1 = Convert.ToInt32(textBox6.Text.ToString());
n2 = Convert.ToInt32(textBox7.Text.ToString());
n3 = Convert.ToInt32(textBox8.Text.ToString());
n4 = Convert.ToInt32(textBox9.Text.ToString());
n5 = Convert.ToInt32(textBox10.Text.ToString());
sum = n1 + n2 + n3 + n4 + n5;
// sum
textBox16.Text = Convert.ToString(sum);
}
but the "Input string was not in a correct format." this message is displayed.