I have a List<TeamName>
, where class TeamName
contains the List<MembersName>
So I have something like this:
List<TeamName> teamNameList //each item of "tnl" has public member "memberNameList"
...
class TeamName //each team has different member
{
public TName
public List<MemberName> memberNameLis;
}
class MemberName
{
public MName;
}
Now i want to make all possible combination of MemberName from each Team.
e.g. I have 3 teams (T1, T2, T3
) they have members count as -
T1 = 3 members, T2 = 2 Members, T3 = 1 member,
So now I need something -
T1M1 T2M1 T3M1
T1M1 T2M2 T3M1
T1M2 T2M1 T3M1
T1M2 T2M2 T3M1
T1M3 T2M1 T3M1
T1M3 T2M2 T3M1
List<List<MemberName>> combi;
how to do this in Code? i am just a beginner so kindly pardon me for not asking a question in a clean pattern. help please :)