M
Mostafa Salaheldien
Guest
hello everyone,
iam using this code for select all the duplicates in listbox but what i need here i want to check duplicate for the item i select
Dim duplicates = Listrate.Items.OfType(Of String).
Select(Function(currentItem, index) New With {
Key .Index = index,
Key .Text = currentItem}).
GroupBy(Function(g) g.Text).Where(Function(g) g.Count() > 1)
For Each topItem In duplicates
For Each value In topItem
Listrate.SetSelected(value.Index, True)
Next
Next
Continue reading...
iam using this code for select all the duplicates in listbox but what i need here i want to check duplicate for the item i select
Dim duplicates = Listrate.Items.OfType(Of String).
Select(Function(currentItem, index) New With {
Key .Index = index,
Key .Text = currentItem}).
GroupBy(Function(g) g.Text).Where(Function(g) g.Count() > 1)
For Each topItem In duplicates
For Each value In topItem
Listrate.SetSelected(value.Index, True)
Next
Next
Continue reading...