Probably the only problem is that you don't understand what events do and how they are related to event handlers. Please see my comment to the question.
Suppose you have some event(s) declared in some class (in your case, this is
Button
, but I'm showing a quite general pattern):
class MyEventArguments : System.EventArgs {}
class MyClass {
internal event System.EventHandler<MyEventArguments> SomethingIsHappening;
internal event System.EventHandler<MyEventArguments> SomethingHappened;
if (SomethingIsHappening != null)
SomethingIsHappening.Invoke(this, new MyEventArguments());
}
Pay attention for naming conventions.
To events instances are shown. All delegate and event instances are
multi-cast
: they have an invocation list, which is a list of delegate instances, each element carrying the address of a handler method and call parameters "this", which is a reference to the object of a class or structure to be passed to a handler method for instance (that is, non-static) methods. Through invocation, all handlers are called one by one, and they are agnostic to each other. You just add them and expect to be called on some events. In case of a button, such event is its click.
Having these declaration
MyClass MyFirstInstance = new MyClass(
MyClass MySecondInstance = new MyClass(
void MyFirstHandler(object sender, MyEventArguments eventArgs) {}
void MySecondHandler(object sender, MyEventArguments eventArgs) {}
You can add different event handlers to the same or different event instances or add same event handler to different event instances, same or different events of the same instance of a declaring class/structure, in any combinations:
MyFirstInstance.SomethingIsHappening += MyFirstHandler;
MySecondInstance.SomethingHappened += MyFirstHandler;
MyFirstInstance.SomethingIsHappening += MySecondInstance;
MyFirstInstance.SomethingIsHappening += delegate(object sender, MyEventArguments eventArgs) {}
MyFirstInstance.SomethingIsHappening += (sender, eventArgs) => {}
—SA