Practice · 1 of 2
One Variable, Many Calls
CHALLENGE
Difficulty: intermediate+25 XP
Implement MakeCounter: each call to the factory returns a FRESH Func<int> — invoking it returns 1, 2, 3, … for that instance. Two counters must not interfere.
``csharp
static Func<int> MakeCounter();
``
Press Submit to check your solution.
Back to lesson: Practice: Closure Capture Practice