Link to home
Start Free TrialLog in
Avatar of openshac
openshac

asked on

Copying a Two Dimensional Array - the most effecient way

What's the most efficient way of copying a two-dimensional array in C# without having to copy it element by element.

I want to avoid the following:
for (int i = 0; i < noOfRows; i++)
    for (int j = 0; j < noOfCols; j++)
        newArray[i, j] = array[i, j];

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Jaime Olivares
Jaime Olivares
Flag of Peru image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial