Ejemplo n.º 1
0
        private void GeneraSuma()
        {
            _sistema = new Sistema();
            int _resultado;

            try
            {
                _sistema._valor1 = Convert.ToInt32(vista.GetValor1());
                _sistema._valor2 = Convert.ToInt32(vista.GetValor2());
                _resultado       = _sistema.sumar();

                vista.SetResultado("EL RESULTADO ES: " + _resultado.ToString());
            }
            catch
            {
                vista.SetResultado("VALORES INCORRECTOS");
            }
        }