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

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

python - Django-easy-pdf: xhtml2pdf reporting reportlab 2.2+ is required, but 3.0 installed -

collision detection - C++ library for mesh to mesh intersection: what is available? -