Mid GoF Patterns

Context (TrafficLight):?

  • The TrafficLight class holds the current state and delegates behavior to

the state object. The context can change its state by calling the SetState

method, which updates the current state reference.

More from Design Patterns in C#

All questions for this course