Exemple #1
0
 // cannot change access modifiers
 public override Animal publicDummyMethod(Animal animal)
 {
     Console.WriteLine("[CHILD] Public Dummy Method");
     animal.doItCreature();
     animal.doItAnimal();
     return animal;
 }
Exemple #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;
 }
Exemple #3
0
 public virtual Animal sample(Animal animal)
 {
     return animal;
 }