// 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; namespace E { public class P { public virtual void Foo(int v = 123) { Console.WriteLine(v); } } public class C : P { public override void Foo(int v = 456) { base.Foo(v); } } public class Program { public static void Main(string[] args) { P o1 = new C(); o1.Foo(); C o2 = new C(); o2.Foo(); } } }