static void Main(string[] args) { Base b = new Base(); b.Execute(); b = new Derived(); b.Execute(); Console.Write("Press a key to exit"); Console.ReadKey(); }
static void Main(string[] args) { Base b = new Base(); b.Execute(); b = new Derived(); b.Execute(); Derived d = new Derived(); d.Execute(); Console.ReadKey(); }