c# - how to change class member visibility? -


i have class combobox inside. want add items combobox different class, cannot see it. i've instantiated class (with combobox) using 'new', i.e.:

check_reg _check_reg = new check_reg(); 

but in second class see _form1.choose_quar_selectedindexchanged paramter, handler shown when double click combo box in form, not me add items.

i'm sure it's basic question... please me it. thx!

for sure can create public instance method inside class "check_reg" add items combobox.

something this:

public void additem(listitem li) {     ddl.items.add(li); } 

and can use this:

check_reg _check_reg = new check_reg(); _check_reg.additem(new listitem("text", "value")); 

hope helps.

cheers


Comments

Popular posts from this blog

c++ - OpenMP unpredictable overhead -

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

javascript - Wordpress slider, not displayed 100% width -