sum a list of integers c# code example
Example 1: c# sum of list
using System.Linq;
int my_sum = my_int_list.Sum();
Example 2: c# calculate sum of list
double total = myList.Sum(item => item.Amount);
using System.Linq;
int my_sum = my_int_list.Sum();
double total = myList.Sum(item => item.Amount);