3 Dimensional Array
Posted
by George Johnston
on Stack Overflow
See other posts from Stack Overflow
or by George Johnston
Published on 2010-04-15T23:33:44Z
Indexed on
2010/04/15
23:43 UTC
Read the original article
Hit count: 304
c#
I don't know why I'm experiencing so much trouble with this, but I would like to have an array that basically represents a layer number and x,y coordinates so I could essentially say,
int i = array[layer,x,y] and get the corrisponding value per layer. I create the array..
int[,,] myarray
...initialize it
myarray = new int[0,width, height];
...and it blows up when try and grab a value.
int n = myarray[0,1,1]
What am I missing?
© Stack Overflow or respective owner