class Program { static void Main(string[] args) { //Collection var primes = new List<int> { 1, 2, 3, 5, 7, 11, 13, 17, 19, 23 }; //SQL like quering IEnumerable<int> query = from val in primes where val < 13 select val; foreach (var val in query) Console.WriteLine(val); //using expressions var methodQuery = primes.Where(x => x < 13); foreach (var val in methodQuery) Console.WriteLine(val); } } } }
Lemme engineeracle your Software Warcraft! One place for tech explorations of Kushan and up to date contents on cloud-based business productivity and enterprise collaboration.