Trouver les doublons dans la Liste(De Chaîne) dans VB.NET
J'ai un customers
List(of String) sur lequel je suis en train d'essayer de trouver le double des clients.
If Not customers.Count = customers.Distinct.ToList.Count Then
customers = customers.Except(customers.Distinct.ToList)
End If
Mais j'obtiens l'exception suivante:
InvalidCastException Unable to cast object of type '<ExceptIterator>d__99`1[System.String]' to type
'Système.Les Collections.Génériques.Liste`1[Système.Chaîne de]'.
Est-ce la bonne façon de trouver les doublons dans une liste?
InformationsquelleAutor Lenin Raj Rajasekaran | 2012-06-27
Vous devez vous connecter pour publier un commentaire.
La version de visual basic:
C#: