title: ambiguity between variables in C#
body: <p>I want to start by saying I did search first, and found a lot of similar issues on various other things, but not this problem exactly.</p>
  
  <p>I have this code:</p>
  
  <pre><code>namespace New_Game.GameClasses
  {
      /// &lt;summary&gt;
      /// This is a game component that implements IUpdateable.
      /// &lt;/summary&gt;
      public class Error : Microsoft.Xna.Framework.GameComponent
      {
          bool gameOver = false;
          List&lt;Enemy&gt; enemies = new List&lt;Enemy&gt;();
  
          public bool gameOver {
              get { return gameOver; }
              set { gameOver = value; }
          }
  
          public override void Update(GameTime gameTime, Vector2 target)
          {
              // TODO: Add your update code here
              Rectangle playerRect = new Rectangle((int)target.X, (int)target.Y, 64, 64);
  
              foreach (Enemy e in enemies)
              {
                  e.Target = target;
                  e.Update(gameTime);
                  Rectangle enemyRect = new Rectangle((int)e.Position.X + 7, (int)e.Position.Y + 7, 32 - 7, 32 - 7);
  
                  if (playerRect.Intersects(enemyRect))
                  {
                      gameOver = true;
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>My problem comes in an error saying this: Ambiguity between 'New_Game.GameClasses.Error.gameOver' and 'New_Game.GameClasses.Error.gameOver'</p>
  
  <p>If I remove the get/set method, I run into a different error when I try and access gameOver from my Game1.cs.  If I change it to the following I get the same error:</p>
  
  <pre><code>public bool gameOver { get; set; }
  </code></pre>
  
  <p>My question, is how do I resolve the ambiguity errors?</p>