private void button1_Click(object sender, EventArgs e) { try { Class1 girubaSumDLL = new Class1(); if (string.IsNullOrEmpty(textBox1.Text)) { textBox1.Text = "0"; } if (string.IsNullOrEmpty(textBox2.Text)) { textBox2.Text = "0"; } if (string.IsNullOrEmpty(textBox3.Text)) { textBox3.Text = "0"; } int sum = girubaSumDLL.AddThreeNumbers(int.Parse(textBox1.Text), int.Parse(textBox2.Text), int.Parse(textBox3.Text)); textBox5.Text = sum.ToString(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }