How it works
prices holds 3, then 5, then 8. The first index is 0, so prices[0] prints 3. Sum visits 3, then 5, then 8 and prints 16. Nothing in this sample removes an item. The list you start with is the list Sum sees.
A working example
var prices = new[] { 3m, 5m, 8m };
Console.WriteLine(prices[0]);
Console.WriteLine(prices.Sum());Expected output
3 16
Try this
Start with the whole list.
Start with the whole list.