title: How to display comboBox value instead displaying name of objects
body: <p>About 3 hours I am trying to solve this issue. My combo box display to me name of object instead a value for example: A</p>
  <p><a href="https://i.stack.imgur.com/3ldN0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3ldN0.png" alt="enter image description here" /></a></p>
  <p>This is my class:</p>
  <pre><code>namespace Supermarket
  {
      public class WhareHouseTable
      {
          public string name { get; set; }
          public double cost { get; set; }
          public string offer { get; set; }
      }
  }
  </code></pre>
  <p>And here is my code:</p>
  <pre><code>private void Form1_Load(object sender, EventArgs e)
  {
      List&lt;WhareHouseTable&gt; product = new List&lt;WhareHouseTable&gt;();
      product.Add(new WhareHouseTable { name = &quot;A&quot;, cost = 0.63, offer = &quot;Buy 2 for the price of 1&quot; });
      product.Add(new WhareHouseTable { name = &quot;B&quot;, cost = 0.20 });
      product.Add(new WhareHouseTable { name = &quot;C&quot;, cost = 0.74, offer = &quot;Buy 2; get B half price&quot; });
      product.Add(new WhareHouseTable { name = &quot;D&quot;, cost = 0.11 });
      product.Add(new WhareHouseTable { name = &quot;E&quot;, cost = 0.50, offer = &quot;Buy 3 for the price of 2&quot; });
      product.Add(new WhareHouseTable { name = &quot;F&quot;, cost = 0.40 });
  
      comboBox2.DataSource = product;
      comboBox2.DropDownStyle = ComboBoxStyle.DropDownList;
  
      source.DataSource = product;
  
      foreach (var selected in product)
      {
          comboBox2.Text = selected.name;
          itemCostLabel.Text = selected.cost.ToString();
          offerLabel.Text = selected.offer;
      }
  }
  </code></pre>
  <p>In foreach I am trying to get all products and represent them in comboBox and in labels.</p>
  <p>What can I do in this situation?</p>