Of the LINQ methods which use deferred execution, some require a single value to be evaluated at a time. The following code:
var lst = new List<int>() {3, 5, 1, 2};
var streamingQuery = lst.Select(x => {
Console.WriteLine(x);
return x;
});
foreach (var i in streamingQuery) {
...