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 !!!