Check out example codes for "array reduce c#". It will help you in understanding the concepts better.

Code Example 1

//retorna a soma de todos os itens do array
	static int simpleArraySum(int[] ar) {
        return ar.Aggregate((acc, x) => acc + x);
    }

Learn ReactJs, React Native from akashmittal.com