// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; public class MS { public virtual void Action() { Console.WriteLine("MS"); } } public class Stub : MS { public void Test() { Action(); } } public class Trick : Stub { public override void Action() { base.Action(); Console.WriteLine("Trick"); } } public class App { public static void Main(string[] args) { Stub o1 = new Stub(); o1.Test(); Trick o2 = new Trick(); o2.Test(); } }