static void Main(string[] args) { Coffee coffe = new Espresso(); Console.WriteLine(coffe.GetPrice()); coffe = new MilkDecorator(coffe); Console.WriteLine(coffe.GetName()); Console.ReadLine(); }
static void Main(string[] args) { ICoffee coffee = new Espresso(); coffee = new MilkDecorator(coffee); coffee = new SugarDecorator(coffee); coffee.GetCoffeeDetails(); Console.ReadLine(); }