ListBox
对象被绑定BindingList<KeyValuePair<string, string>>
在 SelectionChanged 事件上,我需要将所选项目作为KeyValuePair<string, string>
以下代码给出错误,因为 KeyValuePair 不能用作引用类型。
KeyValuePair<string, string> selectedProperty = listProperties.SelectedItem as KeyValuePair<string, string>;
有什么好的解决方法?