Rectangle contains Point returns false
<p>I am making a simple Pacman game using c# in Visual studio. I decided to make a rectangles of a maze in which the main character can walk. I have a rectangle which covers main character's bounds:</p>

<pre><code>Rectangle _pacmanBound = new Rectangle(Left, Top, 28, 28);
</code></pre>

<p>Then I take the 4 points of this rectangle (top left, bottom left, top right and bottom right).
I also have a List with rectangle areas in which pacman can walk:</p>

<pre><code>map = new List&lt;Rectangle&gt;();

map.Add(new Rectangle(12, 375, 430, 28)); 
map.Add(new Rectangle(12, 403, 28, 97)); 
map.Add(new Rectangle(12, 470, 430, 28));
</code></pre>

<p>Now I want to check if all these 4 points belong to any of the rectangles in a list (so it indicates that the area is walkable):</p>

<pre><code>foreach (Rectangle r in _maze.map)
{
    if (r.Contains(_pacmanBound.X, _pacmanBound.Y))
    {
        topLeft = true;

    }
    else if (r.Contains(_pacmanBound.X, _pacmanBound.Y + _pacmanBound.Height))
    {
        bottomLeft = true;    
    } 
    else if (r.Contains(_pacmanBound.X + _pacmanBound.Width, _pacmanBound.Y))
    {
        topRight= true;
    } 
    else if (r.Contains(_pacmanBound.X + _pacmanBound.Width, _pacmanBound.Y + _pacmanBound.Height))
    {
        bottomRight = true;
    }
}
</code></pre>

<p>After loop the first one is <strong>true</strong>, second - <strong>false</strong>, third - <strong>false</strong> and fourth = <strong>false</strong></p>

<p>To let you better understand, I add this picture:
<a href="https://i.stack.imgur.com/gqion.png" rel="nofollow"><img src="https://i.stack.imgur.com/gqion.png" alt="http://i.imgur.com/hvLKNOy.png"></a></p>

<p>Any help is appreciated.</p>