Beispiel #1
0
 // cannot change access modifiers
 public override Animal publicDummyMethod(Animal animal)
 {
     Console.WriteLine("[CHILD] Public Dummy Method");
     animal.doItCreature();
     animal.doItAnimal();
     return animal;
 }
Beispiel #2
0
 // virtual or abstract method cannot be private
 public virtual Animal publicDummyMethod(Animal animal)
 {
     Console.WriteLine("[BASE] Public Dummy Method");
     animal.doItCreature();
     animal.doItAnimal();
     return animal;
 }