private void Form1_Load(object sender, System.EventArgs e)
{
ArrayList col= new ArrayList();
col.Add( new DictionaryEntry("Jack",1));
col.Add(new DictionaryEntry("Joe",2));
col.Add( new DictionaryEntry("Jules",3));
comboBox1.DisplayMember="Key";
comboBox1.ValueMember ="Value";
comboBox1.DataSource=col;
}
private void comboBox1_SelectedIndexChanged(object sender, System.EventArgs e)
{
MessageBox.Show("You chose value: " +comboBox1.SelectedValue );
}