Exemple #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     ingresar    = new Resta();
     ingresar.R1 = double.Parse(textBox1.Text);
     ingresar.R2 = double.Parse(textBox2.Text);
     label3.Text = ingresar.Calcular().ToString();
 }
Exemple #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            rest     = new Resta();
            rest.R11 = double.Parse(txtValA.Text);
            rest.R21 = double.Parse(txtValB.Text);

            lblResult.Text = Convert.ToString(rest.Calcular());
        }