public static void Main(string[] args)
    {
        var       sub = new SubClass();
        BaseClass b   = sub;
        I1        i   = sub;

        sub.Write();
        b.Write();
        i.Write();
    }
Beispiel #2
0
        static void Main(string[] args)
        {
            MyClass myClass = new MyClass();

            I1 i1 = myClass;
            I2 i2 = myClass;

            i1.Write();
            i2.Write();

            Write(myClass);
        }
Beispiel #3
0
 public static void Write(I1 i1)
 {
     i1.Write();
 }