Decorator Pattern – Structural – C#
2018-06-26
The decorator pattern allows behavior to be added to an individual object. Example c# public abstract class BaseSalad { protected double myPrice; public virtual double GetPrice() { return this.myPrice; } } public abstract class ExtrasDecorator : BaseSalad { protected BaseSalad salad; public ExtrasDecorator(BaseSalad saladToDecorate) { this.salad = saladToDecorate; }Continue Reading