SelectedIndex
ComboBox
Form
var list = new List<system.collections.dictionaryentry>(); list.Add(new System.Collections.DictionaryEntry("one", 1)); list.Add(new System.Collections.DictionaryEntry("two", 2)); comboBox1.DataSource = list; comboBox1.DisplayMember = "Key"; comboBox1.ValueMember = "Value"; comboBox1.SelectedIndex = 0; comboBox2.DataSource = list; comboBox2.DisplayMember = "Key"; comboBox2.ValueMember = "Value"; comboBox2.SelectedIndex = 1;
comboBox1
comboBox2
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)