public class ArrayHolder {
int[,] array;
ReceivesArray r;
public ArrayHolder() {
array = new int[50, 50];
// array gets filled
//...
r = new ReceivesArray(array);
}
}
public class ReceivesArray {
int[,] receivedArray;
public ReceivesArray(int[,] theArray) {
receivedArray = theArray;
}
}
I'm doing something like the example above, but instead of passing the whole array to the class that needs it, I want to pass a pointer to the array produced in ArrayHolder. How would I go about doing this?