Lists permutations (unknown number)
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/545703/combination-of-listlistint">Combination of List&lt;List&lt;int&gt;&gt;</a>  </p>
</blockquote>



<p>I have multiple Lists, could be 2 or 3 up to 10 lists, with multiple
values in them. Now what I need to do is to get a combination of all
of them.</p>

<p>For example, if I have 3 lists with the following values:</p>

<ul>
<li>List 1: 3, 5, 7 </li>
<li>List 2: 3, 5, 6</li>
<li>List 3: 2, 9</li>
</ul>

<p>I would get these combinations</p>

<ul>
<li>3,3,2 </li>
<li>3,3,9  </li>
<li>3,5,2
Etc..</li>
</ul>

<p>Now the problem is I cannot do this easily because I do not know how many lists I have, therefore determine how many loops I need.</p>
