// 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) // since .NET 4.8 / C# 8 (2019) using System; public class MI { public interface P1 { public void M1() { Console.WriteLine("P1.M1"); } } public interface P2 { public void M2() { Console.WriteLine("P2.M2"); } } public class C : P1, P2 { } public static void Main(string[] args) { C o = new C(); ((P1)o).M1(); ((P2)o).M2(); } }