public static void Main()
Console.WriteLine("Hey, Look! Exception {0}", ex);
Console.WriteLine("Hey, Look! Another Exception {0}", ex);
Console.WriteLine("Done");
public static void TestMethod1()
Test myObject = new Test();
Type testType = typeof(Test);
PropertyInfo prop = testType.GetProperty("TestProperty");
prop.SetValue(myObject, "cat");
Console.WriteLine("Caught Me!");
Console.WriteLine(ex.ToString());
Console.WriteLine(ex.InnerException.Message);
Console.WriteLine("I'm never hit, previous line throws.");
public static void TestMethod2()
Test myObject = new Test();
Type testType = typeof(Test);
PropertyInfo prop = testType.GetProperty("AnotherTest");
prop.SetValue(myObject, "cat");
Console.WriteLine("Caught Me!");
Console.WriteLine(ex.ToString());
Console.WriteLine(ex.InnerException.Message);
Console.WriteLine("I'm never hit, previous line throws.");
public int TestProperty {get;set;}
private string anotherTest;
public string AnotherTest
throw new NotImplementedException();