I have an interface that declares an event that will be raised when properties are changed in the inheriting class. I was reading about correct event calling ex:
var eventptr = MyEvent;
if(eventptr != null)
MyEvent(args);
When I came across : ' in rare cases a delegate can detach' and when it's called it would throw a null reference exception. I was thinking about adding a static function(probably an extension method) that all classes that inherited the interface could call. The function would accept the arguments and the invocation list of the event, it would cycle through each event and if an exception was thrown it would continue down the invocation list which is critical that it does. Can the static function still invoke the delegates in the invocation list even though the function is not part of the base class? Also are there any better ideas to what I'm trying to prevent?