foreach (Control c in this.Controls) { if (c is ComboBox) { ComboBox textBox = c as ComboBox; if (textBox.SelectedValue == null) { MessageBox.Show("please fill all fields"); break; } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)