Mid SOLID

How does the Decorator pattern differ from the Proxy pattern?

  • Decorator adds additional responsibilities to objects dynamically without altering

their interface. It wraps the original object to extend behavior.

  • Proxy controls access to an object, possibly adding lazy initialization, access control,

or logging, without changing its interface.

More from Design Patterns in C#

All questions for this course