码迷,mamicode.com
首页 > 其他好文 > 详细

C# ComboBox基本使用

时间:2014-05-23 06:21:05      阅读:215      评论:0      收藏:0      [点我收藏+]

标签:style   class   blog   c   code   java   

bubuko.com,布布扣
 1 Dictionary<string, string>test = new Dictionary<string, string>();
 2         test.Add("1", "第一行");
 3         test.Add("2", "第二行");
 4         test.Add("3", "第三行");
 5         comboBox1.DataSource = new BindingSource(test, null);
 6         comboBox1.DisplayMember = "Value";
 7         comboBox1.ValueMember = "Key";
 8 
 9 
10 string value = ((KeyValuePair<string, string>)comboBox1.SelectedItem).Value;
bubuko.com,布布扣

记性不好,方便检索

C# ComboBox基本使用,布布扣,bubuko.com

C# ComboBox基本使用

标签:style   class   blog   c   code   java   

原文地址:http://www.cnblogs.com/aisiyes/p/3741722.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!