You can use the Sum function, but you’ll have to convert the strings to integers, like so:
int total = monValues.Sum(x => Convert.ToInt32(x));
You can use the Sum function, but you’ll have to convert the strings to integers, like so:
int total = monValues.Sum(x => Convert.ToInt32(x));