title: foreach c# gives unable to cast error
body: <p>I have a program written in C# with a clear button, which needs to clear the content of the entire form. For the button I used on foreach for the radiobuttons and one for the checkboxes.</p>
  
  <pre><code>foreach (RadioButton rad in quiztabs.TabPages)
  {
      rad.Checked = false;
  }
  foreach (CheckBox chk in quiztabs.TabPages)
  {
      chk.Checked = false;
  }
  </code></pre>
  
  <p>However, when I click the clear button I get an <code>Unable to cast object of type System.Windows.Forms.TabPage to type System.Windows.Forms.RadioButton</code>.</p>