The variable in question is an array. Let's say I want to loop through a series of arrays (array1; array2; array3; etc.). I want to form the loop like this:
This doesn't work because of the way I've concatenated the variable name. What is the correct way to express this in C#?Code:for (int i = 0; i < 4; i++) { currentXUBound = array + i.GetUpperBound(0); currentYUBound = array + i.GetUpperBound(1); //do other processes here... }




Reply With Quote