النصوص المشتركه في الاثنتين فقط
اذا كنت تريد ازالة التكرار من ListBox استعمل هذا
PHP كود :
For i = ListBox1.Items.Count - 1 To 0 Step -1
If ListBox2.FindString(ListBox1.Items(i)) = -1 Then ListBox1.Items.RemoveAt(i)
Next
For i = ListBox2.Items.Count - 1 To 0 Step -1
If ListBox1.FindString(ListBox2.Items(i)) = -1 Then ListBox2.Items.RemoveAt(i)
Next
PHP كود :
Dim lst As New List(Of String)
lst.AddRange(ListBox1.Items.Cast(Of String).ToArray)
ListBox1.Items.Clear()
ListBox1.Items.AddRange(lst.Distinct.ToArray)
