开发者

C# - How to clear a ListBox's values

开发者 https://www.devze.com 2023-03-15 03:56 出处:网络
How is it possible to clear a ListBox\'s values, e.g. private void clearvalue开发者_StackOverflow中文版s_Click(object sender, EventArgs e)

How is it possible to clear a ListBox's values, e.g.

    private void clearvalue开发者_StackOverflow中文版s_Click(object sender, EventArgs e)
    {
        <Wipe ListBox1 Values>
    }


I assume you're using WinForms

listBox.Items.Clear();


Use this:

   listBox.Items.Clear();


Try This One

ListBox1.ClearSelection();
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号