in .Net is there any way to find matching combinations for given value in data table ?
data table is like
ItemID, Name, Quantity
1, A, 2
2, B, 1
3, C, 3
4, D, 4
5, E, 5
need to get possible combinations with matching Quantity column.
E.G. if I passed 8
need result of DataTable (2+1+5 = 8, 3+5 = 8, 1,3,4 = 8) as
combinationID, Quantity, NoOfItems(Row Count for combinationID)
1, 2, 3
1, 1, 3
1, 5, 3
2, 3, 2
2, 5, 2
3, 1, 3
3, 3, 3
3, 4, 3