is there a way to dynamically add this whole adding process instead of the manually entering the values like a.Add("1 & 2");
and so on
by the way, this only happens if i select 5 conditions
-i am doing the adding base on the maximum condition i cater which is 5
the subsets that i show below must be in that pattern although its ok that the order can be different but the values must be increment like (1 & 2 & 3).So jumping values like (1 & 4) is not allowed and no reverse subsets like (3 & 2)
ArrayList a = new ArrayList();
a.Add("1 & 2");
a.Add("2 & 3");
a.Add("3 & 4");
a.Add("4 & 5");
a.Add("1 & 2 & 3");
a.Add("2 & 3 & 4");
a.Add("3 & 4 & 5");
a.Add("1 & 2 & 3 & 4");
a.Add("2 & 3 & 4 & 5");
So if i have 6 condition then the list will add on for type two subsets(5 & 6), type 3 subsets(4 & 5 & 6), ...goes on which will even create another type of subsets if possible which would be type 5(1 & 2 & 3 & 4 & 5) in this case
Any method/ways are welcome as long as the results are the same which is the arraylist will contain the whole set of subsets base on the maximum condition.
Cheers, Jaf