// 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 interface I { object m(); } public class C : I { object I.m() { Console.WriteLine("The explicit version called"); return m(); } public string m() { Console.WriteLine("The real version called"); return "blabla"; } } public class Program { public static void Main(string[] args) { Console.WriteLine("First I:"); I general = new C(); general.m(); Console.WriteLine("Now C:"); C specific = new C(); specific.m(); } } }