pzozulka
asked on
LINQ: Sum of a numeric collection
Do the below perform the same result with the same performance? The end-goal is sum up all the amounts in the downPaymentsList.
totalDownPayments = downPaymentsList.AsEnumera ble().Sum( dp => (decimal)dp.Amount.Value);
downPaymentsList.AsEnumera ble().ToLi st().ForEa ch(dp => totalDownPayments += dp.Amount.Value);
totalDownPayments = downPaymentsList.AsEnumera
downPaymentsList.AsEnumera
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.