static void UsePoints() { try { var point = new Point(10, 20); point.Move(new Point(40, 60)); Console.WriteLine(" Point is at {0}, {1}", point.X, point.Y); point.Move(new Point(100, 200)); Console.WriteLine(" Point is at {0}, {1}", point.X, point.Y); point.Move(null); } catch (Exception) { Console.WriteLine("An unexpected error occured."); } }//end UsePoints
static void UsePoints() { try { var point = new Point(10, 20); point.Move(null); System.Console.WriteLine($"{point.X} & {point.Y}"); } catch (System.Exception) { Console.WriteLine("An Unexpected error occurred"); } }