private void textBox10_Click(object sender, EventArgs e) { int a = 0, b = 0, c = 0; if (!int.TryParse(textBox8.Text, System.Globalization.NumberStyles.Integer, System.Globalization.CultureInfo.CurrentUICulture, out a)) { MessageBox.Show("u need to enter value"); } else if (!int.TryParse(textBox9.Text, System.Globalization.NumberStyles.Integer, System.Globalization.CultureInfo.CurrentUICulture, out b) || (b > a)) { MessageBox.Show("u entered greater value"); } else { c = a - b; textBox10.Text = c.ToString( System.Globalization.CultureInfo.CurrentUICulture); } }
textBox8.Text
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)