static void Main(string[] args) { Person chris = new Person("Chris", "Sullivan"); chris.TestMethod(); Minor sophie = new Minor("Sophie", "O'Connor", true); sophie.DemoMethod(); sophie.TestMethod(); Person kenn = new Minor("Kenn", "Pascascion", true);//Can do this. Inheriting fro kenn.TestMethod(); Minor benn = new Person("Harry", "Smith");//Can't do that }
static void Main(string[] args) { Person adam = new Person("Adam", "Demaree", 26); Minor christopher = new Minor("Christopher", "Demaree", 2, false); }