I\'m pretty new here.
I have a form, and want to check if the user filled it in correctly. In the form there\'s a combo box; how can I build the \"if\" statement fo
Use:
if(comboBox.SelectedIndex > -1) //somthing was selected
To get the selected item you do:
Item m = comboBox.Items[comboBox.SelectedIndex];
As Matthew correctly states, to get the selected item you could also do
Item m = comboBox.SelectedItem;