I have a list. It contains a class named ProductTransaction.
C#
List productList = new List();
class ProductTransaction
{
string product;
DateTime date_sold;
string category;
} productList.Add(new ProductTransaction () {product="sword", date_sold=03/05/2017,category="weapons"});
productList.Add(new ProductTransaction() {product="sword2", date_sold=03/01/2017,category="weapons"});
productList.Add(new ProductTransaction() {product="potion", date_sold=02/05/2017,category="life"});
productList.Add(new ProductTransaction() {product="jacket", date_sold=02/03/2017,category="clothing"});
productList.Add(new ProductTransaction() {product="jacketofBear", date_sold=02/01/2017,category="clothing"});I want to achieve a data like below.Please see attached image file
Month productCount categoryCount
March 2 1
February 3 2
Thank you and GodBless

Amit GuptaRank #190 · 12.8K reputationPosted Mar 5, 2017, 8:38 AM EST
Chris A10 reputationPosted Jul 12, 2017, 3:11 PM EDT