class Category { public string Name { get; set; } public int Count { get; set;} } Name Count AA 2 BB 3 AA 4
I have an IEnumerable<Category>
and would like to get a list of Categories with unique names and the sum of multiple entries
Output
Name Count AA 6 BB 3
Update
class Category { public string Name { get; set; } public int CountA { get; set;} public int CountB { get; set;} public string Phone { get; set;} }
How would I sum two columns. and the phone column can be the last row or any row
1 Answer