I am working with 2D arrays. what I want, is to dynamically add elements in specific columns of my 2D array named symboltable2.
I have been doing it as;
result is another 1D array in which there are certain words:
string[,] symboltable2 = new string[,];
if (result.Contains("int")) {
for (int todynamic = 0; todynamic < result.GetLength(0); todynamic++) {
symboltable2[todynamic, 6] = "int";
}
for (int sym2 = 0; i < symboltable1.GetLength(0); sym2++) {
f4.listBox6.Items.Add(symboltable1[sym2, 5]); // To show if the values are added or not
}
}
but the code above isn't giving me any results... kindly help :(
string[,] symboltable2= new string[,]won't even compile: Array creation must have array size or array initializer