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 want to add text ( string or number) between each listbox
ex:)listbox1 first items is 'A' , listbox2 first items is 'b' , listbox3 first items is 'c'...etc . Now I want listbox10 first item to be "The letters ABC is now done"
The main idea is to combine all listboxes items and adding text between them to create a meaningful sentence
here is my code
Dim controls = New List(Of ListBox)() From _
{ListBox1, ListBox2, ListBox3, ListBox4, ListBox5, ListBox6, ListBox7, ListBox8}
Dim minCount = Controls.Min(Function(x) x.Items.Count)
For x = 1 To minCount - 1
ListBox10.Items.Add(String.Join(" ", controls.Select
(Function(lb) lb.Items(x).ToString)))
Next
End Sub
Where i must to add my (string)?
ListBox10.Items.Add("The letters is " & String.Join(...- LarsTech0 to minCount - 1- LarsTech