Rectangle.IntersectsWith Method (Rectangle)

 

Determines if this rectangle intersects with rect.

Namespace:   System.Drawing
Assembly:  System.Drawing (in System.Drawing.dll)

member IntersectsWith : 
        rect:Rectangle -> bool

Parameters

rect
Type: System.Drawing.Rectangle

The rectangle to test.

Return Value

Type: System.Boolean

This method returns true if there is any intersection, otherwise false.

The following code example demonstrates the Intersect, IsEmpty and the IntersectsWith members. This example should be used with a Windows Form. Paste this code into a form and call this method when handling the form's Paint event, passing e as PaintEventArgs.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: