I would like to override Show() method for form, but the c# does not let me do it. I want to do it to refresh listbox when I am going back to the previous window. I do not want to use observable collection etc.
protected override void Show() {
base.Show();
list.Items.Clear();
loadListItems();
}
‘Sklep.OknoProduktow.Show()’: cannot override inherited member
‘System.Windows.Forms.Control.Show()’ because it is not marked
virtual, abstract, or override
Why not use from activated event?
It’ll help you. When your form activated, your listbox will refresh.
I think that you can not override the
show()and this is why it did not solve your issue.