Linq Example 34 - Sum

2:24 AM
Linq Query:

//Sum
            int[] intNumbers = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
            int sum = intNumbers.Sum();
            Console.WriteLine(sum);

//

Output:
55

0 comments:

Post a Comment