class MyBase
{
public event EventHandler MyEvent;
private EventHandler _myCustomEvent;
public event EventHandler MyCustomEvent
{
add
{
_myCustomEvent += value;
}
remove
{
_myCustomEvent -= value;
}
}
void foo()
{
MyEvent.GetInvocationList();
+MyCustomEvent.GetInvocationList();+
}
}
class User
{
public static void Main(string[] args)
{
MyBase myBase = new MyBase();
+MyCustomEvent.GetInvocationList();+
}
}
Today I seem to be pretty inattentive
Of course, in User.Main method last line should read
myBase.MyCustomEvent.GetInvocationList();