private void button2_Click(object sender, EventArgs e) { double a = Convert.ToDouble(numericUpDown1.Value); double b = Convert.ToDouble(numericUpDown2.Value); Couple action = new Couple(a, b); textBox1.Text = action.SubResult().ToString(); }