Пример #1
0
        private static void CheckForZero(Complex a, Complex b)
        {
            if (!(b.Modulus() < Eps))
            {
                return;
            }

            var args = new DivideByZero {
                Dividend = a, Divider = b
            };

            a.DivideByZeroEvent?.Invoke(a, args);
        }
Пример #2
0
 public static void DbZEvent(object obj, DivideByZero args)
 {
     throw new DivideByZeroException("Divide by zero");
 }