private void button1_Click(object sender, EventArgs e) { double A, B, SUMA, RESTA; A = double.Parse(textBox1.Text); B = double.Parse(textBox2.Text); if (radioButton1.Checked == true) { SUMA = A + B; Text = SUMA.ToString(); } else { if (radioButton1.Checked == true) { A = double.Parse(textBox1.Text); B = double.Parse(textBox2.Text); RESTA = A - B; Text = RESTA.ToString(); } } }
private void RESTA_Click(object sender, EventArgs e) { RESTA obj2 = new RESTA(); obj2.R1 = double.Parse(textBox1.Text); obj2.R2 = double.Parse(textBox2.Text); label3.Text = obj2.RealizaRESTA().ToString(); }
public ActionResult Resta(Variables n) { RESTA resta = new RESTA(); double resultado = 0; resultado = resta.resta(n.Num1, n.Num2); return(Ok(resultado)); }