Contains

Rectangle.Contains method

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