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

            t1.SomeVirtualMethod("");
            ((ParentClass)t1).SomeVirtualMethod("test");

            t1.SomeFinalMethod("");
            ((ParentClass)t1).SomeFinalMethod("test");

            ParentClass t2 = new ChildClass();

            t2.SomeVirtualMethod("");
            ((ChildClass)t1).SomeVirtualMethod("test");

            t2.SomeFinalMethod("");
            ((ChildClass)t1).SomeFinalMethod("test");

            Console.ReadKey();
        }