static void Main(string[] args) { son s = new son(); Console.WriteLine(s.hello()); ////////////////////////////////// grandfather g = new son(); Console.WriteLine(g.hello()); }
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()); }