Rectangle.Contains

Contains(int, int)

Determines if the specified point is contained within this Rectangle structure.

public bool Contains(int x, int y)
ParameterTypeDescription
xInt32The x-coordinate of the point to test.
yInt32The y-coordinate of the point to test.

Return Value

This method returns true if the point defined by x and y is contained within this Rectangle structure; otherwise false.

See Also


Contains(Point)

Determines if the specified point is contained within this Rectangle structure.

public bool Contains(Point point)
ParameterTypeDescription
pointPointThe Point to test.

Return Value

This method returns true if the point represented by point is contained within this Rectangle structure; otherwise false.

See Also


Contains(Rectangle)

Determines if the rectangular region represented by rect is entirely contained within this Rectangle structure.

public bool Contains(Rectangle rect)
ParameterTypeDescription
rectRectangleThe Rectangle to test.

Return Value

This method returns true if the rectangular region represented by rect is entirely contained within this Rectangle structure; otherwise false.

See Also