Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

array reduce c#

    //retorna a soma de todos os itens do array
	static int simpleArraySum(int[] ar) {
        return ar.Aggregate((acc, x) => acc + x);
    }
 
PREVIOUS NEXT
Tagged: #array #reduce
ADD COMMENT
Topic
Name
1+5 =