C#: easiest way to populate a ListBox from a List
Try :
List<string> MyList = new List<string>();
MyList.Add("HELLO");
MyList.Add("WORLD");
listBox1.DataSource = MyList;
Have a look at ListControl.DataSource Property
You can also use the AddRange
method
listBox1.Items.AddRange(myList.ToArray());
Is this what you are looking for:
myListBox.DataSource = MyList;