static void MovingDemo() { Console.WriteLine("Moving Demo"); try { Console.WriteLine("Lets move rectangle 1 to the top right corner by 10."); MyRectangle rect1 = new MyRectangle(new Point2D(4, 4), 4, 4); rect1.Move(Direction.TopRight, 10); PrintfRectInfo(rect1); Console.WriteLine(); Console.WriteLine("Lets move rectangle 1 to the previous position."); rect1.Move(Direction.BottomLeft, 10); PrintfRectInfo(rect1); } catch (Exception e) { throw e; } Console.WriteLine(new string('-', 30)); }