Экономика

Задана форма. Как вписать проверку параметров?  То есть,  например, диаметр отверстия не должен быть больше самой плиты.  using System; using System.Windows.Forms; namespace Form1Namespace { public partial class Form1 { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, System.EventArgs e) { } private void button1_Click(object sender, System.EventArgs e) { //Начальные параметры плиты textBox1.Text = "35"; textBox2.Text = "40"; textBox3.Text = "22"; textBox4.Text = "30"; textBox5.Text = "30"; textBox6.Text = "10"; textBox7.Text = "8"; textBox8.Text = "7"; textBox9.Text = "18"; textBox10.Text = "8"; textBox11.Text = "10"; } private void button2_Click(object sender, System.EventArgs e) { if ((textBox1.Text != "")&&(textBox2.Text != "")&&(textBox3.Text != "") &&(textBox4.Text != "")&&(textBox5.Text != "")&&(textBox6.Text != "") &&(textBox7.Text != "")&&(textBox8.Text != "")&&(textBox9.Text != "") &&(textBox10.Text != "")&&(textBox11.Text != "")) { int p1 = int.Parse(textBox1.Text); int p2 = int.Parse(textBox2.Text); int p3 = int.Parse(textBox3.Text); int p4 = int.Parse(textBox4.Text); int p5 = int.Parse(textBox5.Text); int p6 = int.Parse(textBox6.Text); int p7 = int.Parse(textBox7.Text); int p8 = int.Parse(textBox8.Text); int p9 = int.Parse(textBox9.Text); int p10 = int.Parse(textBox10.Text); int p11 = int.Parse(textBox11.Text); //Метод создания плиты NewMacroNamespace.NewMacroClass.Plita(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11); } else MessageBox.Show("Заполните все поля!","Внимание",MessageBoxButtons.OK,MessageBoxIcon.Error); } } }