Home » FAQ » WinForms » from MFC » How do you clear the contents of a list box?
You have to access the Items of the ListBox using the Items property and clear (or otherwise operate on the items) these.
this.lb1.Items.Clear();
Platform BlazorASP.NETWinFormsWPF.NET MAUI
Question *
Answer (Optional)
Email (Optional)
Email address is only for further clarification on your FAQ request. It will not be used for any other purpose.
Please leave this field empty.
Share with