I'm assuming you don't wanna check the textboxes individually, like
if (String.IsNullOrWhiteSpace(textbox.Text))
{
MessageBox.Show("You have empty fields in the form");
}
if (String.IsNullOrEmpty(textbox.Text.Trim())
{
MessageBox.Show("You have empty fields in the form");
}
That allows you to check a specific control and report on it.
But when you have too many textbox controls, you can do this
foreach (Control control in this.Controls)
{
if (control is TextBox && String.IsNullOrWhiteSpace(((TextBox)control).Text))
{
return;
}
if (control is CheckBox && !((CheckBox)control).Checked)
{
return;
}
}