i have got 15 combo Boxs on the form
they are named cbo1 - cbo15
the following works just fun
strY= cbo1.Text;
but i wanna learn the for loop way to do it....
i have tried many times...can't figure this out.
how can i refer to the 15 combo boxes in the loop.....
for (int intI =1 ; intI < 16; intI ++)
{
ComboBox cbo = ComboBox (cbo+(intI).ToS tring()) ;
strY = cbo.Text;
}
error message: 'System.Windows .Forms.ComboBox ' denotes a 'class' which is not valid in the given context
thx a lot....
Regards
Sky
they are named cbo1 - cbo15
the following works just fun
strY= cbo1.Text;
but i wanna learn the for loop way to do it....
i have tried many times...can't figure this out.
how can i refer to the 15 combo boxes in the loop.....
for (int intI =1 ; intI < 16; intI ++)
{
ComboBox cbo = ComboBox (cbo+(intI).ToS tring()) ;
strY = cbo.Text;
}
error message: 'System.Windows .Forms.ComboBox ' denotes a 'class' which is not valid in the given context
thx a lot....
Regards
Sky
Comment