title: Find duplicates in List(Of String) in VB.NET
body: <p>I have a <code>customers</code> List(of String) on which I am trying to find the duplicate customers.</p>
  
  <pre><code>If Not customers.Count = customers.Distinct.ToList.Count Then
       customers = customers.Except(customers.Distinct.ToList)
  End If
  </code></pre>
  
  <p>But I get the following exception:</p>
  
  <blockquote>
  <pre><code>InvalidCastException
  Unable to cast object of type '&lt;ExceptIterator&gt;d__99`1[System.String]' to type
  </code></pre>
    
    <p>'System.Collections.Generic.List`1[System.String]'.</p>
  </blockquote>
  
  <p>Is this the right way to find duplicates in a list?</p>