I'm using vb.net form.
I have 8 listboxes (listbox1 , listbox2,listbox3..) each one contains many items and another empty listbox (listbox10). I'm trying to add first listboxes items into the listbox10
ex: ) listbox1 first items is 'A' , listbox2 first items is 'b' , listbox3 first items is 'c'...etc . Now listbox10 first item must be "Abc..."
The problem is i'm only able to add 3 listboxes into the listbox10 But i want to all 8 listboxes to include in the loop.
here is my code
Dim n As Integer = _
Math.Min(ListBox1.Items.Count, Math.Min(ListBox2.Items.Count, ListBox3.Items.Count))
For i As Integer = 0 To n - 1
ListBox10.Items.Add( _
ListBox1.Items(i).ToString + _
ListBox2.Items(i).ToString + _
ListBox3.Items(i).ToString)
Next