O'Reilly logo

C# Primer Plus by Klaus Michelsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Arrays of More Than Two Dimensions

As mentioned earlier, C# lets you work with arrays of more than two dimensions. For example, if you want to collect elevator requests from 10 elevators instead of just one, and for 7 days/24 hours, you can match this requirement with a three-dimensional rectangular array declared as shown in Figure 11.12. The number of commas in the square brackets of the declaration must now be two instead of one; and three numbers, each specifying the length of a dimension, are needed when creating the three-dimensional array object.

Figure 11.12. Declaring and defining the three-dimensional rectangular requests array.

To traverse ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required