public static void Main(string[] args)
        {
            try
            {
                // take the inverse of 0
                MathClass mathObject = new MathClass("Value", 0);
                Console.WriteLine("The inverse of d.Value is {0}",
                                  mathObject.Inverse());
            }
            catch (Exception e)
            {
                Console.WriteLine("\nUnknown fatal error:\n{0}", e.ToString());
            }

            // wait for user to acknowledge
            Console.WriteLine("Press Enter to terminate...");
            Console.Read();
        }
 public CustomException(string sMsg, MathClass mo)
 {
     mathobject = mo;
     sMessage   = sMsg;
 }