I currently want a 2D array (4,4) to look like this:
outArr = new string[4, 4]
{
{"0","0","0","0" },
{"0","0","0","0" },
{"0","0","0","0" },
{"0","0","0","0" }
};
However, I'm unsure of how to do with in code where the array sizes could be dynamic at runtime (i.e. 3,5 or 10,10)
I found this example on how to create the array dynamically (for an int array):
int[,] myArray=new int[(int)s[0],(int)s[2]];
myArray[0, 0] = 2;
Console.WriteLine(myArray[0, 0]);
Console.ReadLine();
But I want to know how to create the elements "0" in my array dynamically.
