I have a list. It contains a class named ProductTransaction.
- 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
Chris APosted Jul 12, 2017, 7:11 PM
Amit GuptaPosted Mar 5, 2017, 1:38 PM