Pattern Junction
Gang of Four · C# 14 on .NET 10 LTS

Which design pattern fits the problem?

Real situations first, patterns second. All 23 classic patterns, plus the apartment lift, come with a live simulator: press Play, change the inputs, try the wrong approach, and watch the C# line that runs at each step.

Creational: how objects get made Structural: how objects fit together Behavioral: how objects talk
Where this started · Observer

Train a → z: passengers subscribe and unsubscribe

A boards at a and gets down at d, B travels c → g, C travels f → l. The train only announces each station; each passenger decides if it's their stop. Add your own passenger before the train reaches their station.

Use-case catalog

24 real situations, 24 simulators

Open any card to run its simulator next to the C# code. The tabs under each simulator explain the situation, why the pattern is the best fit, the tempting wrong answers, and where else it makes sense.

Quiz

Name the pattern

Fifteen fresh scenarios, shuffled each round. Each answer explains why, and what the tempting alternative gets wrong.