public static void Main()
r1 = new Rectangle(0,0,10,10);
r2 = new Rectangle(-10,-10,50,50);
Console.WriteLine(false);
public static bool DoOverlap(Rectangle r1, Rectangle r2)
return (r1.X + r1.Width) >= (r2.X)
&& (r1.Y + r1.Height) >(r2.Y)
&& (r2.X + r2.Width) >= (r1.X)
&& (r2.Y + r1.Height) > (r1.Y);