I have an event on one of my classes that I want to attach a handler to. However, I don't need the handler to do anything, as I am just testing the behaviour of the class with handlers attached or not.
The event signature is as follows:
public event EventHandler<EventArgs> Foo;
So I want to do something like:
myClass.Foo += ();
However this isn't a valid lambda expression. What is the most succinct way to express this?