design-patterns
design-patterns copied to clipboard
Thank you for your example on the Decorator chapter.
Hello good sir,
Just wanted to give you a huge thanks for this. I was stuck trying to convert the book's example to C# and was lucky enough to find your example. I kept getting Unknown Beverage $1.49 and could not figure it out. After walking down through your code everything made sense. The public virtual string Description { get; protected init; } = "Unknown Beverage"; made so much sense to me after reading it, I think I kept trying to for abstract instead of using virtual.
Anyways, thanks again.