IEnumerable with a foreach loop

image_pdfimage_print
   
 

using System;
using System.Collections.Generic;
using System.Linq;
public class MainClass {
    public static void Main() {

        IEnumerable<char> query = "Not what you might expect";

        foreach (char vowel in "aeiou")
            query = query.Where(c => c != vowel);

        foreach (char c in query) Console.Write(c); 
    }
}