title: windowsform, checkbox, button clicks
body: <p>My question is regarding c# windows form.</p>
  
  <p>I have three checkboxes in a form:</p>
  
  <blockquote>
    <p>checkbox1, checkbox2, checkbox3</p>
  </blockquote>
  
  <p>and a button.</p>
  
  <p>The button programming is this:</p>
  
  <pre><code>    private void checkBox1_CheckedChanged(object sender, EventArgs e)
      {
  
      }
  
      private void checkBox2_CheckedChanged(object sender, EventArgs e)
      {
  
      }
  
      private void checkBox3_CheckedChanged(object sender, EventArgs e)
      {
  
      }
      private void button6_Click(object sender, EventArgs e)
      {
          if (checkBox1.Checked)
          {
          }
          else
          if (checkBox2.Checked)
          {
          }
          else
          if (checkBox3.Checked)
          {
          }
          else
              if (checkBox1.Checked &amp;&amp; checkBox2.Checked)
          {
          }
          else
          if (checkBox1.Checked &amp;&amp; checkBox3.Checked)
          {
          }
          else
          if (checkBox2.Checked &amp;&amp; checkBox3.Checked)
            {
            }
          else
        if (checkBox1.Checked &amp;&amp; checkBox2.Checked &amp;&amp; checkBox3.Checked)
          {
          }
          else
          {
      MessageBox.Show("Please Select an Checkbox to Perform");
          }
  
          MessageBox.Show("All Done!");
      }
  </code></pre>
  
  <p>My problem is that when if I check all three checkboxes it goes through the whole if statements within the button, 
  it processes all functions within the button, 
  I want that when i check all checkboxes its should perfon only this statement, and other as checked.</p>
  
  <pre><code>//If(checkbox1.checked &amp;&amp; Checkbox2.checked &amp;&amp; checkbox3.Checked) {}
  </code></pre>
  
  <p>and so on</p>