Esempio n. 1
0
        static void Main(string[] args)
        {
            MyDerivedClass d = new MyDerivedClass();

            d.Message();
            IMsg m = d as IMsg;

            m.Message();
            MyClass myClass = d;

            myClass.Message();
            Console.ReadKey();
            //Result:
            //MyDerivedClass
            //MyDerivedClass
            //MyDerivedClass
        }