Posted on: 3/5/2014 11:23:42 PM | Views : 520

I'm trying to send the third number in a three-dimensional array as an argument. However, I'm not sure what to actually send. Here's what the code looks like, where "THIRD NUMBER" is is where I'm trying to send it. Basically, in the case of the first cell of the array, if x == 0 and y == 1, I want 0 to be sent as an argument.

public int[, ,] numberArray = new int[,,] { { { 0 , 1 , 0 } } }; void Page_Load(Object sender, EventArgs e) { Submit.Click += new EventHandler(this.Submit_Click); } void Submit_Click(object sender, EventArgs e) { for (int x; x <= numberArray.GetLength(0); x++) { for (int y; y <= numberArray.GetLength(1); y++ ) { determineScore("THIRD NUMBER"); } } } void determineScore(int z) { //do something. . . } }

Go to the complete details ...