Such is the problem, if I enter numbers into TextBox right away, everything is fine, but if I start with a minus, debugging stops. a2 is previously declared in the code as a double variable. What can be done?
private void textBox2_TextChanged(object sender, EventArgs e) { a2 = double.Parse(textBox2.Text); }
Parse()method, useTryParse()- Bulson-not a number. Therefore, if only a minus is entered, then a parsing error. - Alexander Petrov