1st statement:
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');
Output of String.Join("", query)
: "Nt wht y mght xpct"
2nd statement:
query = "Not what you might expect";
foreach (char vowel in "aeiou")
query = query.Where (c => c != vowel);
Output of String.Join("", query)
: "Not what yo might expect"
The outputs from these statements are different. Can any one explain why?