younis abdeljawwad

younis abdeljawwad

  • NA
  • 73
  • 96.9k

array of comboboxes

Jun 30 2012 5:05 PM
i create an array of comboboxes in the run time , now every combobox have numbers, i want to get the selected values from every combox
i try to do like this :


                string[] mar = new string[countstudents];
                for (int r = 0; r < countstudents; r++)
                {

                    mar[r] = markcomboBox[r].Items[markcomboBox[r].SelectedIndex].ToString();
                
                   
                }



but an error happen says that :"Object reference not set to an instance of an object"
what is the problem !!!


Answers (1)