我正在使用.NET 2.0,尝试将ComboBox的数据源绑定到已排序的字典。
所以我遇到的错误是“在数据源上找不到DataMember属性'Key'。”
SortedDictionary<string, int> userCache = UserCache.getSortedUserValueCache();
userListComboBox.DataSource = new BindingSource(userCache, "Key"); //This line is causing the error
userListComboBox.DisplayMember = "Key";
userListComboBox.ValueMember = "Value";
IDictionary<int, string>
时,我遇到了这个错误。 - Ryan Lundy