Example #1
0
        static void Main(string[] args)
        {
            son s = new son();

            Console.WriteLine(s.hello());
            //////////////////////////////////
            grandfather g = new son();

            Console.WriteLine(g.hello());
        }
Example #2
0
        static void Main(string[] args)
        {
            son s = new son();

            Console.WriteLine(s.hello()); // call Son.hello()
            //////////////////////////////////
            grandfather g = s;

            Console.WriteLine(g.hello()); // call Grandfather.hello()
            Console.WriteLine(g.GetType());
        }