Randomly re-partition 1Dimensional List to 2Dimensional I wrote a solution Please look at the my approach is correct? There is a better solution?

List&lt;Tuple&lt;object, object, object&gt;&gt; OneDimensionalLists = new List&lt;Tuple&lt;object, object, object&gt;&gt;();
List&lt;Tuple&lt;object, object, object&gt;[]&gt; TwoDimensionalLists = new List&lt;Tuple&lt;object, object, object&gt;[]&gt;();

int i1 = 0;
for (int i = 0; i &lt; OneDimensionalLists.Count; i++)
{
    var random = new Random(seed);
    int next = random.Next(10, 30);
    TwoDimensionalLists.Add(new Tuple&lt;object, object, object&gt;[next]);
    for (int j = 0; j &lt; next; j++)
    {
        if (OneDimensionalLists.Count == i1)
            goto go;

        TwoDimensionalLists[i][j] = OneDimensionalLists[i1++];
    }
}
go:
for (int i = 0; i &lt; OneDimensionalLists.Count; i++)
{
    var random = new Random(seed);
    int next = random.Next(10, 30);
    ...



Have you checked the value of next on the various iterations? I can't see seed changing anywhere in this code. Assuming it remains the same, random.Next() will return the same value each time. Unless this is intentional, create the Random(seed) outside of the loop.