public static void Main(string[] args) { var sub = new SubClass(); BaseClass b = sub; I1 i = sub; sub.Write(); b.Write(); i.Write(); }
static void Main(string[] args) { MyClass myClass = new MyClass(); I1 i1 = myClass; I2 i2 = myClass; i1.Write(); i2.Write(); Write(myClass); }
public static void Write(I1 i1) { i1.Write(); }