int[,] A = {{1,2},{3,4},{5,6}}; int[,] B ; B = (int[,])A.Clone(); A[0,0] = 99; A.Dump(); B.Dump();
int[,] a1 = new int[4, 6]; a1[2, 3] = 4; a1[3, 5] = 25; int[,] a2 = new int[a1.GetUpperBound(0) + 1, a1.GetUpperBound(1) + 1]; Array.Copy(a1, a2, a1.Length);
public static int[,] copying2dArray(int[,] array, int rowLength, int clumnLength) { int[,]Copy = new int[rawLength, columnLenggth]; for (int i = 0; i < rooms; i++) { for (int j = 0; j < timeSlots; j++) { Copy[i, j] = aray[i, j]; } } return populationCopy; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)