Calculate Total of Items in List I would like to convert the following procedure to use Linq, but I'm not sure how to accomplish it, ForEach or Sum?

    public int GetBalance()
    {
        int balance = 0;

        foreach (IDenomination denomination in Account)
        {
            balance += denomination.Currency * denomination.BillCount;
        }

        return balance;
    }


Account is a property in the class:  

public List&lt;IDenomination&gt; Account { get; set; }
Or you could do it in two steps, like you do it now. First calculate for each denomination and then sum:

int balance = Account.Select(denom =&gt; denom.Currency * denom.BillCount).Sum();