static void Main(string[] args) { KDerived d = new KDerived(); d.Start(); d.Update(); KBase b = new KDerived(); b.Start(); b.Update(); KBase c = new KFinal(); c.Start(); c.Update(); Console.ReadKey(); /* * KDerived::Start * KBase::Update * KDerived::Update * KBase::Start * KBase::Update * KDerived::Update */ }
static void Main(string[] args) { KBase c = new KFinal(); c.Start(); c.Update(); Console.ReadKey(); /* * KFinal::Start * KDerived::Update */ }