Challenge 2: Reimplementing Where() as a Custom Extension Method — Possible Solution ==================================================================== MyLinqExtensions.cs: public static class MyLinqExtensions { public static IEnumerable MyWhere(this IEnumerable source, Func predicate) { foreach (var item in source) { if (predicate(item)) { yield return item; } } } } Program.cs: List numbers = new() { 1, 2, 3, 4, 5, 6, 7, 8 }; var evens = numbers.MyWhere(n => n % 2 == 0); foreach (var n in evens) { Console.WriteLine(n); } Output: 2 4 6 8 Explanation: MyWhere is written with exactly the same shape as the chapter's own sketch of the real Where -- a generic extension method on IEnumerable, taking a Func predicate. Calling numbers.MyWhere(...) works with ordinary dot-syntax on a List, even though List never defines MyWhere itself -- the exact same mechanism proven to be behind the real .Where() call used throughout csharp1-8 and csharp2-2. WHY THIS WORKS AS AN ANSWER ------------------------------ This builds a working, from-scratch reimplementation of Where()'s own shape as a genuine extension method, using it with the identical dot-syntax LINQ's real version uses, directly demonstrating the chapter's own central reveal in practice.