I have a main class that has a Sub procedure with no implementation. Any derived class should override and implement this procedure, so I used MustOverride in the base class.
Now, any time this procedure is called, I need to set a specific Boolean variable to True at the beginning of the procedure and set it to False at the end.
Is there a way to avoid writing these two lines of code in procedure implementation of every single derived class? Can I set this value to True in the base class, then run procedure in the derived class and then set the value back in the base class?
Thank you in advance.