winforms - C#: easiest way to populate a ListBox from a List -


if have list of strings, eg:

list<string> mylist = new list<string>(); mylist.add("hello"); mylist.add("world"); 

is there easy way populate listbox using contents of mylist?

try

        list<string> mylist = new list<string>();         mylist.add("hello");         mylist.add("world");          listbox1.datasource = mylist; 

have @ listcontrol.datasource property


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -