I want to get sum of the values from list.
For example: I have 4 values in list 1 2 3 4 I want to sum these values and display it in Label
Code:
You can use the Sum function, but you'll have to convert the strings to integers, like so:
Sum
int total = monValues.Sum(x => Convert.ToInt32(x));