title: Retrieve Value/Name of selected item of comboBox
body: <p>I'm working on a winforms application, I have a comboBox that i bind from a database, each item have a Name and a Value:</p>
  
  <pre><code> //New item class
   public class themeS
   {
       public string Name { get; set; }
       public string Value { get; set; }
       public override string ToString() { return this.Name; }
   }
  
   //Binding ComboBox Event
   using (DbEntities db = new DbEntities())
   {
      comboBox2.Items.Clear();
      IEnumerable tem  = from t in db.Themes where t.idCategorie == 1  select t;
      foreach (Themes Tem in tem)
      {
          comboBox2.Items.Add(new themeS { Value = Tem.idTheme.ToString(), Name= Tem.nomTheme });
      }
   }
  </code></pre>
  
  <p>Now I want to retrieve the Value of selected item of combobox:</p>
  
  <pre><code>string curentIdTem = comboBox2.SelectedValue.ToString();
  </code></pre>
  
  <p>The returned value of <code>comboBox2.SelectedValue</code> is always 'NULL' , someone can help me please?</p>