Challenge 2: The Same Query, Two Different Results — Possible Solution ==================================================================== Program.cs: var numbers = new List { 1, 5, 10, 15, 20 }; int threshold = 8; var query = numbers.Where(n => n > threshold); // captures threshold LIVE, by reference Console.WriteLine("First enumeration (threshold = 8):"); foreach (var n in query) Console.WriteLine(n); threshold = 17; // reassigned AFTER the query was defined Console.WriteLine("Second enumeration (threshold = 17):"); foreach (var n in query) Console.WriteLine(n); Output: First enumeration (threshold = 8): 10 15 20 Second enumeration (threshold = 17): 20 Explanation: Because C# lambdas capture the variable itself rather than a snapshot of its value at the moment the lambda was written, `query` doesn't "remember" threshold as 8 forever. Each enumeration re-runs the Where() predicate fresh, reading whatever threshold's CURRENT value is at that exact moment. The first foreach runs while threshold is still 8; the second runs after it's been reassigned to 17 -- same query variable, same underlying Where() call, genuinely different results. WHY THIS WORKS AS AN ANSWER ------------------------------ This demonstrates the chapter's own live-capture claim directly: the exact same query object produces two different outputs across two enumerations, purely because the captured variable changed in between -- something java2-3's effectively-final rule would never allow to even compile in Java.