Rectangle.Contains Method (Microsoft.Xna.Framework)

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

Namespace: Microsoft.Xna.Framework
Assembly: MonoGame.Framework (MonoGame.Framework.dll
  • C#
  • VB
  • F#
public bool Contains(
	Rectangle value

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.


Type: Microsoft.Xna.Framework.Rectangle
The Rectangle to check for inclusion in this Rectangle.

Return Value

Type: System.Boolean
true if the provided Rectangle's bounds lie entirely inside this Rectangle; false otherwise.
Supported in:

 Windows DirectX Desktop
 Linux Desktop
 Windows OpenGL Desktop