예제 #1
0
        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();
        }
예제 #2
0
 public CustomException(string sMsg, MathClass mo)
 {
     mathobject = mo;
     sMessage   = sMsg;
 }