here’s what I am trying to do
class A
{
virtual void foo();
}
class B : A
{
virtual override void foo();
}
class C : B
{
override void foo();
}
so what I want to see when calling C.foo() is
A.foo(), B.foo(), C.foo()
but I dont think virtual override can be used in the same function definition. How would I go around this?
Thanks
-Mike
Overridden functions are automatically
virtual, unless explicitly declaredsealed.Note that calling
C.Foo()will not callB.Foo()orA.Foo()unlessC.Foomanually callsbase.Foo().