C Sharp (C#) - LINQ Fundamentals
Given a list of integers var nums = new List<int> { 2, 4, 6, 8, 10 };, how can you find the sum of only the even numbers using aggregate functions?
Given a list of integers var nums = new List<int> { 2, 4, 6, 8, 10 };, how can you find the sum of only the even numbers using aggregate functions?
Where() to select numbers divisible by 2.Sum() on the filtered list to get total of even numbers.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions