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

Pages: 1-

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:42

>>1
I'm learning the basics of C#
No, you are not. Go and learn the basics of C# by reading a book.

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).

Name: Anonymous 2011-02-24 5:47

>>2
I have a 1.3k page C# book right next to me without a single page on what I've described. I also Googled and couldn't find anything.

Name: Anonymous 2011-02-24 5:47

>>3

Thanks

Name: not >>1 2011-02-24 6:03

>>3
What the fuck are those commas?

Name: Anonymous 2011-02-24 12:49

<--- epic binary trips, yo. (0b0111)

Name: Anonymous 2011-02-24 12:57

>>6

They tell how many dimensions the array is going to have.

no "," = 1 dimension
one "," = 2 dimensions (think on a chess table)
two "," = 3 dimensions and so on...

Name: Anonymous 2011-02-24 13:01

I see C# designers really like unary arithmethic

Name: Anonymous 2011-02-24 13:06

so if i want map 10k dim array(like big sql db) i need to enter 10k ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,? EPIC FAIL

Name: Anonymous 2011-02-24 13:09

[0]:
 0 | NULL 

[0,0]:
0 | N
N | N

[0,0,0]:
         _________________________
        / _____________________  /|
       / / ___________________/ / |
      / / /| |               / /  |
     / / / | |              / / . |
    / / /| | |             / / /| |
   / / / | | |            / / / | |
  / / /  | | |           / / /| | |
 / /_/__________________/ / / | | |
/________________________/ /  | | |
| ______________________ | |  | | |
| | |    | | |_____0___| | |__| | |
| | |    | |___________| | |____| |
| | |   / / ___________| | |_  / /
| | |  / / /           | | |/ / /
| | | / / /            | | | / /
| | |/ / /             | | |/ /
| | | / /              | | ' /
| | |/_/_______________| |  /
| |____________________| | /
|________________________|/

Name: Anonymous 2011-02-24 13:15

byte[0,1,NULL,NULL,NULL,NULL,NULL,NULL,true,NULL]

Name: Anonymous 2011-02-24 14:31

>>10
so if i want map 10k dim array(like big sql db) i need to enter 10k ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,? EPIC FAIL

Epic fail indeed!

Name: Anonymous 2011-02-24 16:58

Terrible!

Name: Anonymous 2011-02-24 17:16


         _________________________
        / _____________________  /|
       / / ___________________/ / |
      / / /| |               / /  |
     / / / | |              / / . |
    / / /| | |             / / /| |
   / / / | | |            / / / | |
  / / /  | | |           / / /| | |
 / /_/___| | |__________/ / / | | |
/________| | |___________/ /  | | |
| _______| | |__________ | |  | | |
| | |    | | |_________| | |__| | |
| | |    |_|/__________| | |____| |
| | |   / / ___________| | |_  / /
| | |  / / /           | | |/ / /
| | | / / /            | | | / /
| | |/ / /             | | |/ /
| | | / /              | | ' /
| | |/_/_______________| |  /
| |____________________| | /
|________________________|/

Name: Anonymous 2011-02-24 18:14

>>15

Your autism... I can feel it from routing tunnels of distance!

Name: Anonymous 2011-02-24 19:22

I can sense autism from 4 blocks over

Name: Anonymous 2011-02-24 20:35

  _
 [☋]  -- I can sense autism from 4 blocks over
/| |\
∩┝┳┥∩
 ╘╧╛

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