Dim hTable As Hashtable = New Hashtable()
Dim duplicateList As ArrayList = New ArrayList()
Dim itm As ListViewItem
For Each itm In ListView1.Items
If hTable.ContainsKey(itm.Text) AndAlso hTable.ContainsKey(itm.SubItems(1).Text) AndAlso hTable.ContainsKey(itm.SubItems(2).Text) AndAlso hTable.ContainsKey(itm.SubItems(3).Text) Then 'duplicate
duplicateList.Add(itm)
Else
hTable.Add(itm.Text, String.Empty)
End If
Next
'remove duplicates
For Each itm In duplicateList
ListView1.Items.Remove(itm)
Next
I want to compare 3 subitem in listview like this:
Date____________Name_______________Value
11/12/13________llallala_______________12334
11/12/13________llallala_______________12334
11/12/13________ddsfvxcv_____________16542
13/12/12________ddsfvxcv_____________12334
10/12/13________owowewe_____________23024
then normally it will remove first and second row because it is duplicate but now it cannot....
I means it just compare between first column....so if the first column is same but second and third is different then it will remove wrong....
remove item code is working just the compare code not working
sry for bad english