title: How to check if an entry exists or not in an C# List with the Find Method
body: <p>I use a C# List with the Find method the following way:</p>
  
  <pre><code>Tag searchResult = tags.Find(x =&gt; x.TagId.Equals(tag));
  </code></pre>
  
  <p>The list holds the "struct Tag", now my problem is how can I check if the tag entry exists in the list.</p>
  
  <p>Under the <a href="https://msdn.microsoft.com/de-de/library/x0b5b5bc(v=vs.110).aspx" rel="nofollow">MSDN</a> side, I found the following: </p>
  
  <ul>
  <li>If nothing could be found then "the default value for type T" will be
  returned.</li>
  </ul>
  
  <p>So I tried the following:</p>
  
  <pre><code>if(default(Tag) == searchResult ){}
  </code></pre>
  
  <p>But this dosen't work because of the Error: " Operator '==' cannot be applied to operands of type "</p>
  
  <p>What do I wrong?</p>