LAMBDA query to find even elements from Array Collection in C#

Rajnilari2015
Posted by Rajnilari2015 under C# category on | Points: 40 | Views : 852
new int[] { 23,56,78,11,9,1,2,3,4,5,6,100,98,201,54 }
.Where(i => i % 2 ==0)
.ToList()
.ForEach(i => Console.WriteLine(i));

Result
------
56
78
2
4
6
100
98
54

Comments or Responses

Login to post response