Exemplo n.º 1
0
 public MiClase()
 {
     try
     {
         MiClase.MetodoStatic();
     }
     catch (DivideByZeroException ex)
     {
         throw ex;
     }
 }
Exemplo n.º 2
0
 public void MetodoDeInstancia()
 {
     try
     {
         MiClase otraClase = new MiClase(1, 2, '*');
     }
     catch (UnaExcepcion e)
     {
         throw new MiExcepcion("Mensaje MiExcepcion", e);
     }
 }
Exemplo n.º 3
0
 public MiClase()
 {
     try
     {
         MiClase.Calcular();
     }
     catch (DivideByZeroException e)
     {
         throw new DivideByZeroException("Mensaje DivideByZero", e);
     }
 }
Exemplo n.º 4
0
        public MiClase(float numero1, float numero2, char operador)
            : this()
        {
            this.a        = numero1;
            this.b        = numero2;
            this.operador = operador;

            try
            {
                MiClase nuevaClase = new MiClase();
            }
            catch (DivideByZeroException e)
            {
                throw new UnaExcepcion("Mensaje UnaExcepcion", e);
            }
        }