Rectangle.Contains Method (Microsoft.Xna.Framework)

Gets whether or not the provided Vector2 lies within the bounds of this Rectangle.

Namespace: Microsoft.Xna.Framework
Assembly: MonoGame.Framework (MonoGame.Framework.dll
  • C#
  • VB
  • F#
public void Contains(
	Vector2 value, 
	out Boolean result

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.


Type: Microsoft.Xna.Framework.Vector2
The coordinates to check for inclusion in this Rectangle.
Type: out System.Boolean
true if the provided Vector2 lies inside this Rectangle; false otherwise. As an output parameter.
Supported in:

 Windows DirectX Desktop
 Linux Desktop
 Windows OpenGL Desktop