コード例 #1
0
        public static int acumArr(int[,] arr, IBinaryOperation op)
        {
            int res = 0;

            for (int i = 0; i != arr.GetLength(0); ++i)
            {
                for (int j = 0; j != arr.GetLength(1); ++j)
                {
                    res = op.accum(res, arr[i, j]);
                }
            }
            return(res);
        }