The best way to do this is:
public abstract class MyClass {
public void DoOuter() {
FireEvent();
DoInner();
}
protected abstract void DoInner();
}
When someone wants to call doInner, they need to call DoOuter()to execute it. To specify functionality, you override DoInner(). This way, FireEvent()it is always called before the functionality is specified DoInner()... unless it is called directly by a child class that you cannot protect.
source
share