Hi,
I have list like List<promoptionproducts>.This list contains the objects.
PromoptionProducts
- Public Class PromotionProducts
- {
- Public long int
-
- Public long ProductId{get;set;}
-
- public long qty{get;set;}
-
- public decimal price{get;set;}
-
- Public int max {get;set;}
- }
Case1:
- List<PromoptionProducts> promotionproduct=new List<PromoptionProducts>(new promotionproduct({Id=1,productId=101,qty=4,price=25,max=3 });
I want to get the qty of products from list based on max that means I want 3qtyproducts from the list based on 3.
- List<PromoptionProducts> promotionproduct=new List<PromoptionProducts>(new promotionproduct({Id=1,productId=101,qty=2,price=25,max=3 },new promotionproduct({Id=2,productId=102,qty=2,price=35,max=3 });
I want to get the qty of products from list based on max that means I want 3 qty products from the list based on 3.
While using linq queries.
Please help me.
Thank you.