Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Copied from /g/

Name: Anonymous 2011-02-24 5:37

Hey /prog/ I asked /g/ this but they don't seem to know much about programming
Anyways
I'm learning the basics of C# and I'm wondering wtf this means:
byte[, ,][] localchunks = new byte[chunksizex / chunksize, chunksizey / chunksize, chunksizez / chunksize][];

Specifically the "byte[, ,]" and the "byte[chunksizex / chunksize, chunksizey / chunksize, chunksizez / chunksize]"

wtf is with the commas and forward slashes in the "[]" ??

Name: Anonymous 2011-02-24 5:43

byte[,,][] declares a 3 dimensional array of arrays and the slashes are division operators.

The line creates a 3 dimensional array with the first dimension of size (chunksizex / chunksize) the second with (chunksizey / chunksize) and the third with (chunksizez / chunksize).

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List