WinForm给ComboBox增加Value

 ArrayList mylist = new ArrayList(); 
  mylist.Add (
new DictionaryEntry ("1","")); 
  mylist.Add (
new DictionaryEntry ("2","不好")); 
  mylist.Add (
new DictionaryEntry ("3","一般")); 
  mylist.Add (
new DictionaryEntry ("4","")); 
  mylist.Add (
new DictionaryEntry ("5","太好了")); 
  comboBox1.DataSource 
=mylist; 
  comboBox1.DisplayMember 
="Value"
  comboBox1.ValueMember 
="Key"
posted @ 2009-07-28 19:56  xidongs  阅读(316)  评论(0)    收藏  举报