title: Extract item in a list if Contains returns true
body: <p>I have two lists A and B, at the beginning of my program, they are both filled with information from a database (List A = List B).  My program runs, List A is used and modified, List B is left alone.  After a while I reload List B with new information from the database, and then do a check with that against List A.</p>
  
  <pre><code>foreach (CPlayer player in ListA)
        if (ListB.Contains(player))
              -----
  </code></pre>
  
  <p>Firstly, the object player is created from a class, its main identifier is player.Name.
  If the Name is the same, but the other variables are different, would the .Contains still return true?</p>
  
  <pre><code>Class CPlayer(
        public CPlayer (string name)
                _Name = name
  </code></pre>
  
  <p>At the ----  I need to use the item from ListB that causes the .Contains to return true, how do I do that?</p>