18-01-20, 06:48 PM
18-01-20, 07:38 PM
هذا الكود يجد عدد العناصر المكررة في listbox
PHP كود :
Dim r = ListBox1.Items.Cast(Of String).GroupBy(Function(x) New With {Key x}).Where(Function(g) g.Count > 1).Count
MsgBox(r)
19-01-20, 01:20 AM
إذا أردت عدد مرات التكرار في ListBox لعنصر مكتوب في TextBox
PHP كود :
Dim r = ListBox1.Items.Cast(Of String).Count(Function(x) x.Equals(TextBox1.Text))
MsgBox(r)