Bobby_1234
January 18th, 2009, 06:23 PM
Hi,
I have a Lists of certain objects, and am looping through all combos of them like
foreach(object o1 in theobjects){
foreach(object o2 in theobjects){
foreach(object o3 in the objects){
}
}
}
However I dont want to double up on myself, e.g. o1[element 1]o2[element 1]o3[element 2], can be regarded as the same as o1[element 1]o2[element 2]o3[element 1], (i.e. switching the last two etc).
I just want to consider o1[element 1]o2[element 2]o3[element 3],o1[element 2]o2[element 1]o3[element 3],o1[element 3]o2[element 1]o3[element 2]
Hope this makes sense...
I have a Lists of certain objects, and am looping through all combos of them like
foreach(object o1 in theobjects){
foreach(object o2 in theobjects){
foreach(object o3 in the objects){
}
}
}
However I dont want to double up on myself, e.g. o1[element 1]o2[element 1]o3[element 2], can be regarded as the same as o1[element 1]o2[element 2]o3[element 1], (i.e. switching the last two etc).
I just want to consider o1[element 1]o2[element 2]o3[element 3],o1[element 2]o2[element 1]o3[element 3],o1[element 3]o2[element 1]o3[element 2]
Hope this makes sense...