c# - List for both checkedlist box and combobox -


i want add selected items of checkedlistbox , combobox list , use list in each loop in c#

i tried this

list<string> list=new list<string>();  if (rbtnmultiplescenario.checked == true) {     foreach ( checkedlistbox str in clbscenario.selecteditems)     {                              lstitems.add(str);     }                   } 

by using string, not able add selected items of checkedlistbox.

which type of list have use?

list<string> list=new list<string>();  if (rbtnmultiplescenario.checked == true) {     foreach ( string str in clbscenario.selecteditems)     {                              lstitems.add(str);     }                   } 

this assumes selecteditems contains collection of strings (which exception does)


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -