October 8, 2010
VB: Dim dict = New Dictionary(Of String, String)() For n As Integer = 0 To 10 dict.Add("Key " + n.ToString(), "Value " + n.ToString()) Next ComboBoxItem1.ComboBoxEx.DataSource = New BindingSource(dict, Nothing) ComboBoxItem1.ComboBoxEx.DisplayMember = "Value" ComboBoxItem1.ComboBoxEx.ValueMember = "Key" C#: Dictionary<string, string> dict = new Dictionary<string, string>(); for (int n = 0; n <= 10; n++) { […]