title: Get ID of item selected in ComboBox
body: <p>I have a <code>ComboBox</code> that gets filled with items from my database. I'm trying to get the <code>ID</code> of the item that is selected in the <code>ComboBox</code>, but nothing I've tried seems to be working. </p>
  
  <pre><code>int id = cbbilar.SelectedIndex + 1;
  </code></pre>
  
  <p>This is how I have it right now, it's very inefficient and stops working if the first items in the database are removed</p>
  
  <pre><code>var cars = (from z in db.Bilar 
              select new { Value = z.Id, Names = z.Marke.Namn + " "  + z.Namn }).ToList();
  cbbilar.DataSource = cars;
  cbbilar.DisplayMember = "Names";
  cbbilar.ValueMember = "Value";
  cbbilar.SelectedIndex = 0;
  </code></pre>
  
  <p>This is the code for my <code>Combobox</code>. How do I make it fetch the <code>ID</code> of the <code>SelectedItem</code>?</p>