title: How do I get all checkboxes.text that is selected by a user on C#
body: <p>Hello again I need help so I came here.
  I just can't figured out how to do this.</p>
  
  <p>But here's what I want
  I have a c# form with 6 checkboxes on it. Checkboxes.text value are all Name of programming languages.</p>
  
  <p>[]PHP</p>
  
  <p>[]C</p>
  
  <p>[]C++</p>
  
  <p>[]VB.Net</p>
  
  <p>[]Java</p>
  
  <p>[]C#</p>
  
  <p>Suppose a user click two or more checkboxes how can I display it.</p>
  
  <p>I'm getting confuse on multiple selections part.</p>
  
  <p>Here's my code</p>
  
  <p>For the single selection</p>
  
  <pre><code>   If (Checkbox1.Checked == True)
  {
  MessageBox.Show(CheckBox1.Text);
  }
  </code></pre>
  
  <p>For two selection</p>
  
  <pre><code>    If (CheckBox1.Checked == True &amp;&amp; CheckBox2.Checked == True)
  {
  MessageBox.Show(CheckBox1.Text);
  }
  </code></pre>
  
  <p>I use If statements on checkboxes for single or even more selected checkboxes.</p>
  
  <p>How can I code it easier or even simplier. Is it possible?</p>