title: What's different between Contains and Exists in List<T>?
body: <p>I want to know what's different between <code>Contains</code> and <code>Exists</code> in <code>List&lt;T&gt;</code> ?</p>
  
  <p>They can both determine whether an element is in the <code>List&lt;T&gt;</code>.</p>
  
  <p>But what's different between them?</p>
  
  <pre><code>// Create a list of parts.
  List&lt;Part&gt; parts = new List&lt;Part&gt;();
  
  // Add parts to the list.
  parts.Add(new Part() { PartName = "crank arm", PartId = 1234 });
  parts.Add(new Part() { PartName = "chain ring", PartId = 1334 });
  parts.Add(new Part() { PartName = "regular seat", PartId = 1434 });
  parts.Add(new Part() { PartName = "banana seat", PartId = 1444 });
  parts.Add(new Part() { PartName = "cassette", PartId = 1534 });
  parts.Add(new Part() { PartName = "shift lever", PartId = 1634 }); ;
  
  // of the Part class, which checks the PartId for equality.
  Console.WriteLine("\nContains: Part with Id=1444: {0}",
  parts.Contains(new Part { PartId = 1444, PartName = "" }));
  
  // Check if an item with Id 1444 exists.
  Console.WriteLine("\nExists: Part with Id=1444: {0}",
                    parts.Exists(x =&gt; x.PartId == 1444)); 
  
  // result
  // Contains: Part with Id=1444: True 
  // Exists: Part with Id=1444: True 
  </code></pre>