IEnumerable<char> query = "Not what you might expect";
query = query.Where(c=>c!='a');
query = query.Where(c=>c!='e');
query = query.Where(c=>c!='i');
query = query.Where(c=>c!='o');
query = query.Where(c=>c!='u');
foreach(char c in query) Console.Write(c);
Simple LINQ query building. My question is, why all this queries execute? Why not only the last one? How this is compiled, how program knows to return to query initialization? I hope you understand my question.
I Know this code works and it's intuitive, but what happens behind the scenes?