Thursday, February 18, 2010

LINQ Conditional Sum

MyList.Where(x => x.Product == "Apple").Sum(x => x.TotalSales)

No comments: