I want to create a simple PushButton
class which wraps an InterruptPort
. I'd like to give it two simple Up
and Down
events which are triggered when the port is high and low.
Normally I'd do it like this:
public event EventHandler<EventArgs> Up;
public event EventHandler<EventArgs> Down;
But there's no EventHandler
class? How should I do it then?