using System; using System.Collections.Generic; namespace ConsoleApp1 { static class MyLinq { public static IEnumerable Where(this int[] arr, Func cond) { return new int[] { 2, 4, 6, 8 }; } } class Program { static void Main(string[] args) { int[] arr = { 1, 2, 3, 4, 5, 6, 7, 8 }; var query = from x in arr where x % 2 == 0 select x; foreach (int x in query) Console.Write(x + "\t"); } } }