C# Combobox清空值

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

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

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

posted @   #C和C#  阅读(3099)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示