I created a ComboBox with three values. I wanted the message box to open when no item was selected, so I tried this:
if (comboBox1.SelectedItem == null) { MessageBox.Show("Please select a value"); return; }
This works fine, but only if I click in the box in the combo box. When I do not touch it, the program will start without a message box. What's wrong?
source share