title: Checking for & storing multiple CheckBox selections in C#
body: <p>I'm very new to C# and I can't seem to find a good solution to what I would consider a simple problem.</p>
  
  <p>Basically I'm trying to determine which CheckBoxs have been selected by the user and then randomly generate combinations of the selections the user has made.  As new as I am, I am aware that you can use a simple statement such as: </p>
  
  <pre><code>checkBox1.IsChecked == true
  </code></pre>
  
  <p>I could have a long set of if statements which update an array/collection, but I'm told that in C# there is a way of determining which CheckBoxs are checked by querying the GroupBox that the CheckBoxs are in.  Unless I'm mistaken (which is very possible) this is achieved by using Control features, unfortunately I've not come across these yet in my learning so if someone could clear things up that would be great.</p>
  
  <p>In summation, if someone has a simple solution for running through a set of checkBoxs and storing only the selected ones I would be most grateful.</p>