how do i extend a behaviour from the base class like this?
public class A {
protected virtual void foo () {
Console.WriteLine("hi")
}
}
public class B : A {
protected override void foo () {
Console.WriteLine("hihi")
}
}
a = new A();
a.foo()
-> "hi"
-> "hihi"
When calling foo in the parent class i want to execute a behavior specific for that class while at the same time calling it in the child. Is it possible to do this with just accessing the parent?