Use Linq instead of nested foreach loops to sum values : <p>I want to find the sum of values without using a nested foreach loop</p>

<p>How do I write this using Linq instead?</p>

<pre><code>decimal posVal = 0;
decimal negVal = 0;
foreach (var j in journal)
{
    foreach (var t in j.trans)
    {
        foreach (var l in t.line)
        {
            if (l.val &gt; 0)
                posVal += l.val;
            else
                negVal += l.val;
        }
    }
}
</code></pre>
