[Solved] One Dimensional Array to Multidimensional Array


Try this

int indexModifier = 0;

for (int i = 0; i < Math.sqrt(second.Length); ++i)
{
    for (int j = 0; j < Math.sqrt(second.Length); ++j)
    {
        second[j + indexModifier, j] = first[i + indexModifier);
    }
    ++indexModifier;
}

1

solved One Dimensional Array to Multidimensional Array