static void Main(string[] args) { var p = new Parent(); p.ThrowAParty(); var c01 = new Child01(); c01.ThrowAParty(); var c02 = new Child02(); c02.ThrowAParty(); }
static void Main(string[] args) { // these all call the same method, but due to polymorphism the results change var p = new Parent(); p.ThrowAParty(); var c01 = new Child01(); c01.ThrowAParty(); var c02 = new Child02(); c02.ThrowAParty(); }