// positive value / 0 double d = 1.0 / 0.0; Console.WriteLine(d); // negative value / 0 d = -1.0 / 0.0; Console.WriteLine(d); if (Double.IsPositiveInfinity(d)) { Console.WriteLine("Overrun"); } if (Double.IsNegativeInfinity(d)) { Console.WriteLine("Underrun"); } // int division by 0? int i = 1 / 0; // compiler says Error CS0020