-1

I want to determine if a rectangle is intersected by any other rectangle in the form in C# not in XNA.

So here's a scenario. Rectangles A and B change location randomly (using a timer) in the form while Rectangle C is static. None of the rectangles should know about each other so

if (RectA.IntersectsWith(RectB))
            {
                MessageBox.Show("KAPOW");
            }

is not ideal...

Cheers for any help you can give me.

Scriptworks
  • 495
  • 1
  • 6
  • 10

1 Answers1

1

What's wrong with System.Drawing.Rectangle.InterectsWith() method?

Ants
  • 2,628
  • 22
  • 35
  • because the rectangles should NOT know about each others existence...so it as to be compared to any rectangle no 'a' rectangle – Scriptworks Feb 10 '11 at 14:36