title: Selected Checkbox from a bunch of checkboxes in .c#.net
body: <p>The problem is faced under <strong>c# .NET, Visual Studio, Windows Form Application</strong></p>
  
  <p>I have a bunch of checkboxes placed randomly in one form and in one panel.
  So, If any <code>checkbox</code> is selected in the form its value is supposed to be added up.</p>
  
  <p>Bottomline: Instead of using plenty of "If-else loops", to evaluate whether its been checked or not. I wanna simplify it using a "for loop ".</p>
  
  <p>Is there any <code>Checkbox group name</code> type feature, which I can use???</p>
  
  <p>I wanna code something like this:</p>
  
  <pre><code>for(int i=0;i&lt;checkboxes.length;i++)
  {
      string str;
      if(chkbox.checked)
      {
          str+=chkbox.value;
      }
  }
  </code></pre>
  
  <p>Where <code>checkboxes</code> is a group name.</p>