I have populated some items into a listbox using the datasource property. Now I need to set the AutoCompleteCustomSource for a textBox from the items listed in the listbox. Prec
The AutoCompleteStringCollection takes only string[], so it should be like this:
AutoCompleteStringCollection
string[]
var cc = new AutoCompleteStringCollection(); cc.AddRange(listBox1.Items.Cast().ToArray());