Q:

Binding two fields of an object from a list

So I have an class calledCustomerCollection 
class CustomerCollection
    {
        public List<Customer> Customers { get; private set; }
...
}

that has a list of customers
class Customer
{
    public String ID { get; private set; }
    public String Name { get; private set; }

    public Customer(String id, String name)
    {
        ID = id;
        Name = name;
    }
}

Is there away to bind a combo box and a text box such that the combobox will display all the possible ids of Customers in Customer Collection and the textbox will display the name of the chosen customer?
EDIT:
So here's what I've tried
    private void InitializeCustomerCollection()
    {
        var customerCollection = new CustomerCollection();
        cmbx_custID.DataSource = customerCollection.Customers;
    }

But that doesn't work and results the combobox being filled with
X.Collections.Customer
X.Collections.Customer
X.Collections.Customer

A:

This demonstrates adding a combo box to a form with the behavior you describe. The key is setting ValueMember and DisplayMember.
  public partial class Form1 : Form
  {
     public Form1()
     {
        InitializeComponent();
        CustomerCollection cc = new CustomerCollection();
        cc.Customers.AddRange(new Customer[] {new Customer("1", "Adam"), new Customer("2", "Bob")});

        ComboBox ComboBox1 = new ComboBox()
           {Name = "ComboBox1", ValueMember = "ID", DisplayMember = "Name"};
        Controls.Add(ComboBox1);

        ComboBox1.DataSource = cc;
     }
  }

  public class Customer
  {
     public String ID { get; private set; }
     public String Name { get; private set; }

     public Customer(String id, String name)
     {
        ID = id;
        Name = name;
     }
  }

  class CustomerCollection : IListSource
  {
     public List<Customer> Customers { get; private set; }
     public CustomerCollection()
     {
        Customers = new List<Customer>();
     }

     public bool ContainsListCollection
     {
        get { return true; }
     }

     public System.Collections.IList GetList()
     {
        return Customers;
     }
  }

