title: c# contains object not working
body: <p>I am trying to create a check between lists, but am having no luck :-/</p>
  
  <p>I have a game board with 100 fields and make this loop to add only empty fields into a new list:</p>
  
  <pre><code>for(int i = 0; i &lt; thisGame.boardFields.Count; i++)
  {
      if (thisGame.boardFields.Count != 0 &amp;&amp; thisGame.boardFields [i] != null) 
      {
          BoardField thisField = thisGame.boardFields [i];
          if (thisField.owner == "0" &amp;&amp; thisField.number != 13) 
          {
              Tile tTile = new Tile();
              tTile.color = thisField.color;
              tTile.number = thisField.number.ToString();
  
              tempBoard.Add (tTile);
          }
      }
  }
  </code></pre>
  
  <p>Then I loop through the players 5 tiles to see if the player has a tile which is not playable, e.g. a empty field with the same object is not available like this:</p>
  
  <pre><code>for (var i = 0; i &lt; thisGame.playerTiles.Count; i++)
  {    
      Tile tempTile = new Tile();
      tempTile.color = thisGame.playerTiles[i].color;
      tempTile.number = thisGame.playerTiles[i].number.ToString();
  
      if (!tempBoard.Contains (tempTile)) 
      {
          testTile = tempTile;
          print ("HUSTON WE HAVE A PROBLEM: " + tempTile.color + "-" + tempTile.number);
      }    
  }
  </code></pre>
  
  <p>This is the definition of the Tile class:</p>
  
  <pre><code>public class Tile 
  {    
      public int id;
      public string color;
      public string number;   
  }
  </code></pre>
  
  <p>Now my problem is, that it prints on every 5 tiles in the players tile list? All tiles in the players tile list is available in the <code>tempBoard</code> list?</p>
  
  <p>What am I missing her?</p>
  
  <p>Hoping for help and thanks in advance :-)</p>