private static void ShouldThrowEx() { try { var c = new ClassThatThrow(); DynamicCode.GetProperty(c, "IThrowAnException"); } catch (Exception ex) { Debug.WriteLine(ex.Message); } }
private static void MispelledProperty() { try { var c = new ClassThatThrow(); DynamicCode.GetProperty(c, "IDoNotExist"); } catch (Exception ex) { Debug.WriteLine(ex.Message); } }