title: Formatting a string for a listbox in C#
body: <p>I'll start off by saying that the listbox is a requirement for a class project. I'm just trying to spiff it up and make it look nicer by formatting a string before adding it to a list box. I have an override for <code>Product.ToString()</code> that formats the string, but when I add it to the list box, the formatting dissapears.</p>
  
  <p><code>ToString</code> method in <code>Product</code> class:</p>
  
  <pre><code>public override string ToString()
  {
      string newFormat = string.Format("{0,0}{1,20}", Name, Price);
      return newFormat;
  }
  </code></pre>
  
  <p>Update method:</p>
  
  <pre><code>protected void updateLists()
  {
      availableProducts_LB.Items.Clear();
      foreach (Product p in customer.AvailableProducts)
          availableProducts_LB.Items.Add(p.ToString());
  
      shoppingCart_LB.Items.Clear();
      foreach (Product p in customer.shoppingCartList)
          shoppingCart_LB.Items.Add(p.ToString());
  }
  </code></pre>