title: remove an item from combobox
body: <p>I want binding a combobox from all 4 letters words in a text file in my D: drive, so I wrote a class and declare a name and value :</p>
  
  <pre><code>public class Words
  {
      public string Name { get; set; }
      public string Value { get; set; }
  }
  </code></pre>
  
  <p>In my form use this codes to bind all 4 letters to my combobox:</p>
  
  <pre><code>string fileLoc = @"d:\Words.txt";
  string AllWords = "";
  var word4 = new List&lt;Words&gt;();
  if (File.Exists(fileLoc))
  {
      using (TextReader tr = new StreamReader(fileLoc))
      {
          AllWords = tr.ReadLine();
      }
  }
  string[] words = AllWords.Split('-');
  foreach (string word in words)
  {
       if (word.Length == 4)
       {
          word4.Add(new Words() { Name = word, Value = word });
       }
  }
  this.comboBox4.DataSource = word4;
  this.comboBox4.DisplayMember = "Name";
  this.comboBox4.ValueMember = "Value";
  this.comboBox4.DropDownStyle = ComboBoxStyle.DropDownList;
  </code></pre>
  
  <p>now, I want remove word when select it and click a button.just remove from combobox not remove from text file.after reload the form must all words show on combo again.
  becuase I use many combo for all length of words,and in diffrent condition just one of combos are shown to user,for access and remove the item I wrote this method:</p>
  
  <pre><code> ComboBox combo = this.Controls.OfType&lt;ComboBox&gt;().First(K =&gt; K.Visible);
   combo.Items.Remove(combo.SelectedIndex);
  </code></pre>
  
  <p>but it isn't remove any item.please help me.</p>