I have a list with below elements:
{[A,1] ; [B,0] ; [C,0] ; [D,2]; [E,0] ; [F,8]}
When Variable =3 -> i want the return value to be A,D
When variable =11 -> return value to be A, D, F
when 2 -> return value to be D
and so on.
int sum = myList.Sum(x => x.Value)
how to get the corresponding Key (A,D,F)?
Using one of the subsets method in this question
EDIT
a full console application: