Exemple #1
0
 public abstract void VisitCoffee(Coffee coffee);
Exemple #2
0
 public override void VisitCoffee(Coffee coffee)
 {
     Console.WriteLine("{0} take a cup of {1}", this, coffee);
     coffee.AddSugar();
     coffee.AddMilk();
 }
Exemple #3
0
 public override void VisitCoffee(Coffee coffee)
 {
     Console.WriteLine("I don not want to drink coffee");
 }