title: How do I refer to properties of object array inside jagged array in c#?
body: <p>this question is probably going to be a bit confusing, as I'm just starting c# and object-oriented coding in general, but I'll do my best to explain things clearly! For context, I'm trying to make a random dungeon generator for a game project.</p>
  
  <p>I have the jagged array "Dungeon," which I've declared like this:</p>
  
  <pre><code>public Level[][,] Dungeon;
  </code></pre>
  
  <p>To clarify, Dungeon is a 1D array of "Levels." A level is its own object, and it has a few unique properties that I defined in its constructor.</p>
  
  <p>Each level is a 2D array of "mazePieces," which are also objects.</p>
  
  <p>I've figured out how to refer to the entire Dungeon array to do things such as see how many levels are in the dungeon:</p>
  
  <pre><code>Dungeon[x].Length
  </code></pre>
  
  <p>I also can refer to individual mazePieces in a given level:</p>
  
  <pre><code>Dungeon[i][x,y].mobAmount
  </code></pre>
  
  <p>However, I can't figure out how to refer to the properties of an entire Level. If I type in</p>
  
  <pre><code>Dungeon[i].numberOfRooms
  </code></pre>
  
  <p>"numberOfRooms" is not recognized as a property of the level. However, I've found that it will be recognized if I type</p>
  
  <pre><code>Dungeon[i][,].numberOfRooms
  </code></pre>
  
  <p>The issue I'm running into is that the second set of brackets are marked with a syntax error, saying that a value is expected. </p>
  
  <p>What can I put into the second set of brackets so I can refer to the entire level rather than just a specific part of the level?</p>
  
  <p>Hopefully this was at least somewhat understandable, please let me know and I'll do my best to clarify! Thanks!</p>