Limited access to events in derived classes?

Im refactoring a class and moving partitions to a base class.

I have several events similar to

public event EventHandler GridBinding;

Which are now in the base class, but I find that now I can’t check if the event is null in my derived class. This gives me an error:

The event "xyz.GridBinding" can only appear on the left side of + = or - = (except when used inside the type "xyz._MyBaseClass").

Is this correct, have I missed something, or is there a way around this or write an accessory - the only way to do this? I am using C # /. NET 4.0

+3
source share
1 answer

, .

, , , , .

+2

Source: https://habr.com/ru/post/1742257/


All Articles