How to clear ListBox items using WinForms in C#

1 Answer

0 votes
namespace WinFormsApp1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            listBox1.Items.Clear();
        }
    }
}




/*
run:
 
  
*/

 



answered Feb 12, 2024 by avibootz

Related questions

1 answer 167 views
1 answer 139 views
1 answer 133 views
1 answer 155 views
1 answer 129 views
1 answer 101 views
1 answer 128 views
...