static int Main() { try { Console.WriteLine("Testing AA::Method1"); AA.Method1(); } catch (Exception) { Console.WriteLine("Exception handled."); } return(100); }
static int Main() { try { AA.Method1(); Console.WriteLine("failed"); return(1); } catch (NullReferenceException) { Console.WriteLine("passed"); return(100); } }