I\'ve been looking for an answer for about an hour on Google but I did not found exactly what I\'m looking for.
Basically, I have a static Helper class that helps pe
I think the simplest code would be this:
EventHandler myEvent = (sender, e) => MyMethod(myParameter);//my delegate myButton.Click += myEvent;//suscribe private void MyMethod(MyParameterType myParameter) { //Do something //if only one time myButton.Click -= myEvent;//unsuscribe }