int value=(0+1+2+3+4+5+6+7+8+9); int sum= value;
int sum = i.Sum();
int[] i = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; int sum = i.Sum();
for
int[] intArray = { 1, 2, 3, 4, 5, 6 }; int result = 0; Array.ForEach(intArray, item => result += item);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)