次の方法で共有


Rectangle.Contains Method (Int32, Int32)

Determines whether this Rectangle contains a specified point represented by its x- and y-coordinates.

Syntax

'Declaration
Public Function Contains ( _
         x As Integer, _
         y As Integer _
) As Boolean 
public bool Contains (
         int x,
         int y
)
public:
bool Contains(
         int x,
         int y
)

Parameters

  • x
    Type: Int32
    The x-coordinate of the specified point.
  • y
    Type: Int32
    The y-coordinate of the specified point.

Return Value

Type: Boolean
true if the specified point is contained within this Rectangle; false otherwise.

Requirements

Namespace: Microsoft.Xna.Framework

Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

See Also

Reference

Rectangle Structure
Rectangle Members
Microsoft.Xna.Framework Namespace

Platforms

Windows Phone