title: index was out of range in combo box item clear method
body: <p>My combo box lists the record from database. my combo box is as :</p>
  
  <pre><code>&lt;ComboBox Grid.Column="3" Grid.Row="1" Height="30" VerticalAlignment="Center"  Name="comboBoxEmp" SelectionChanged="comboBoxAdministrator_SelectionChanged" BorderBrush="{x:Null}" Foreground="#FFF90C0C" /&gt;
  </code></pre>
  
  <p>I have method to fill combo box as :</p>
  
  <pre><code> void FillComboEmpName()
          {
  
              MySqlConnection conn4;
              conn4 = new MySqlConnection("server=localhost;uid=root;database=newcompanydatabase;pwd=Admin@123;");
              string Query = "select * from nWorksUser";
              MySqlCommand cmd2 = new MySqlCommand(Query, conn4);
              try
              {
                  conn4.Open();
                  MySqlDataReader rdr;
  
                  rdr = cmd2.ExecuteReader();
                  while (rdr.Read())
                  {
                      string EmpNo = rdr.GetInt32("uid").ToString();
                      string fname = rdr.GetString("fname");
                      string lname = rdr.GetString("lname");
                      comboBoxEmp.Items.Add(EmpNo + "-" + fname + " " + lname);
                  }
              }
  
              catch (Exception ex1)
              {
                  MessageBox.Show(ex1.Message);
              }
  
          }
  </code></pre>
  
  <p>As i use the following method to reset the content of combo box i got error :
  "index was out of range. must be non negative or less than the size of collection. parameter name : index"</p>
  
  <pre><code>public Reset()
  {
   comboBoxEmp.Items.Clear();
   FillComboEmpName();
  }
  </code></pre>