Пример #1
0
 private string ChocolateAttitude(Chocolate aChocolate)
 {
     return(_chocolateAttitudes.ContainsKey(aChocolate.Flavor) ?
            _chocolateAttitudes[aChocolate.Flavor] :
            "don't know how to feel about");
 }
Пример #2
0
 public void AddChocolate(Chocolate aChocolate)
 {
     _chocolates.Add(aChocolate);
 }
Пример #3
0
 public void Eat(Chocolate aChocolate)
 {
     Console.WriteLine($"You know, I {ChocolateAttitude(aChocolate)} {aChocolate.Flavor.ToString()} choc-a-lates...");
 }