public abstract class Base {
public void execute() {
//'preexecute code'
child.execute();
//'postexecute code'
}
}
public class Child : Base {
{
public void execute() {
//'Some child specific code'
}
}
Is there any way in C# to support an execution model like above where you call a function in the child class from the base class. The "preexecute code" and "postexecute code" is common and should be ran every time "execute" is called.