sum up an array of integers in C# : <p>I want the sum of the numbers in the array and does not exceed 1002 how can I fix it?
it is not needful to sum all numbers, but only those who qualify</p>

<p>I do it that way but I think it's not the right way</p>

<pre><code> List&lt;int&gt; list = new List&lt;int&gt; { 4, 900, 500, 498, 4 };
        int sum = list.Skip(2).Take(3).Sum();
        Console.WriteLine(sum);
        Console.ReadLine();
</code></pre>
