title: How can I clear the contents of a "comboBox" after I have submitted a form
body: <p>I am trying to clear the contents of a Windows form in C# after I have submitted the data.</p>
  
  <p>I have managed to do this for text boxes using the following code:</p>
  
  <pre><code>foreach (Control c in Controls)
  {
      if (c is TextBox)
      {
          c.Text = "";
  </code></pre>
  
  <p>However, I am struggling to complete the same task for the "comboBoxes" within the form. I have tried to use a variation of the code as follows but this does not seem to work. </p>
  
  <pre><code>if (c is ComboBox)
  {
      c.Text = "";
  </code></pre>
  
  <p>So full code looks as follows:</p>
  
  <pre><code> foreach (Control c in Controls)
   {
       if (c is TextBox)
       {
           c.Text = "";
       }
       if (c is ComboBox)
       {
           c.Text = "";
       }
  </code></pre>
  
  <p>Can anyone suggest a resolution, what am I missing?</p>
  
  <p>Kind Regards</p>
  
  <p>Ian</p>