title: Is there are way to say if all of the conditions are true, else
body: <p>Windows Forms:  Is there a way to say if all of the following conditons are true then 'do this', otherwise 'do this'?  My form has multiple textboxes and at at least one of them needs to have something entered into it.  The code I have below checks for empty textboxes, but if ANY of the textboxes are empty then it sets the condition to false. </p>
  
  <pre><code>private void cmdEnter_Click(object sender, EventArgs e)
  {
      bool allempty = true;
      foreach (Control d in Controls)
      {
          if (d is TextBox)
          { 
              TextBox textbox = d as TextBox;
              if (textbox.Text == string.Empty)
              {
                  allempty = false; 
              }
          }
      }
      if (allempty == false)
      {
          MessageBox.Show("Textboxes are all empty");
      }
      else
      {
          //Data entry code
          MessageBox.Show("Entry Added");
      }
  }
  </code></pre>