title: LINQ to Objects - Does Not Contain?
body: <p>I have a collection of Items that each have a collection of Relationships.  I have a list of Groups that Items can have Relationships with.</p>
  
  <p>I can find all the Items that have a particular relationship but I now want to find all the Items that don't have a Relationship with any of my Groups.</p>
  
  <p>I can find the Items that have a relationship with any of the Groups by doing this:</p>
  
  <pre><code>Dim groupIds as List(of Integer) = (From g In cmdbGroups Select g.ID).ToList
  Dim haveGroup = (From item In items _
                   Where item.Relationships.Any(Function(r) groupIds.Contains(r.TargetID)) _
                   Select item).ToList
  </code></pre>
  
  <p>How can I find all the items that do not have a relationship with any of the groups?</p>