C# - How to clear a ListBox's values
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();
精彩评论