In the first case, when the overring class can prevent the setting of Enable, I believe that Enable and Disable can potentially be misleading method names.
Something like TryEnable and TryDisable is likely to be more accurate, implying that there are situations where you cannot enable it.
The third possible situation could be served if you took Example 2 and changed it so that the base class would call OnEnable before setting the flag:
public void Enable() { OnEnable();
Then overriding classes can prevent the flag from being set by throwing an exception if an error occurs. Thus, error situations can prevent the flag from being changed.
Just food for thought.
source share