(1)创建一个ComboBoxItem类:publicclassComboBoxItem{privatestring_text=null;privateobject_value=null;publicstringText{get{returnthis._text;}set{this._text=value;}}publicobjectValue{get{returnthis._value;}set{this._value=value;}}publicoverridestringToString(){returnthis._text;}}(2)在添加事件中将这个类的列表添加到comboBox的item属性中:privatevoidForm1_Load(objectsender,EventArgse){ComboBoxItemcbi1=newComboBoxItem();cbi1.Text=测试Test1;cbi1.Value=测试Value1;comboBox1.Items.Add(cbi1);ComboBoxItemcbi2=newComboBoxItem();cbi2.Text=测试Test2;cbi2.Value=测试Value2;comboBox1.Items.Add(cbi2);}(3)使用:privatevoidcomboBox1_SelectedIndexChanged(objectsender,EventArgse){if(comboBox1.Items!=null&&comboBox1.Items.Count0&&comboBox1.SelectedItem!=null){stringtext=((ComboBoxItem)comboBox1.SelectedItem).Text;objectvlaue=((ComboBoxItem)comboBox1.SelectedItem).Value;}}