Abc.NCrafts.Quizz.Questions._003.Answer3.Sum C# (CSharp) Method

Sum() private static method

private static Sum ( int items ) : int
items int
return int
        private static int Sum(int[] items)
        {
            var sum = 0;
            foreach (var item in items.Cast<int>())
            {
                sum += item;
            }
            return sum;
        }
    }
Answer3