Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyC#LINQ Where and SelectSingle-choice MCQ

The query below is built but never iterated. When does the lambda inside Where actually run?

var data = new List<int> { 1, 2, 3 }; var query = data.Where(x => { Console.WriteLine("check"); return x > 1; }); // nothing else happens here