static void Main(string[] args) { Parent a = new Parent("a"); a.PMethod(); child b = new child("b"); b.PMethod(); b.CMethod(); }
static void Main(string[] args) { parent p = new parent(); p.showVehicle(); child c = new child(); c.showVehicle(); c.show(); Console.WriteLine("Single Inheritance"); subchild s = new subchild(); s.showVehicle(); s.show(); s.sub(); }