I have following code:
private void someButton_Click(object sender, EventArgs e)
{
SomeForm f = new SomeForm();
this.SomeEvt += f.someFunc;
this.AnotherEvt += f.anotherFunc;
f.Show();
}
Should I unregister f.someFunc from this.SomeEvt and f.anotherFunc from this.AnotherEvt?
I don't want to perform neither f.anotherFunc nor someFunc when f is closed
And if I should do unregister, then how would I do that because there no longer SomeForm f after ending of this function?
I'm using .Net framework 4.0 and WinForms.