Clearing a drop down list in C#

前端 未结 2 694
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-08 01:05

I truly do hate to ask such a crayon-question... I\'m trying to clear, not remove a drop down combo list in VSC#. My ddl lets the user choose the payRate of an employee. I\'

2条回答
  •  有刺的猬
    2021-01-08 01:37

    you can do as below

    while(cmboPayRate.Items.Count>0)
       cmboPayRate.Items.RemoveAt(0);
    

提交回复
热议问题