C# Combobox清空值

C#combobox1中设置dropdownstyle为dropdownlist,清空时写法: comboBox1.SelectedIndex = -1;

C#combobox1中设置dropdownstyle为dropdown,清空时写法: comboBox1.text= "";

C#combobox1中设置了items,清空items时写法: comboBox2.Items.Clear();

posted @ 2018-05-26 17:04  #C和C#  阅读(3060)  评论(0编辑  收藏  举报