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

Multidimensional Arrays

Just as a picture has two dimensions and the room you sit inside is three dimensional, a line only has one dimension and a dot zero dimensions. The five values represented by the array variable accountBalances of Listing 10.1 in Chapter 10, “Arrays Part I: Array Essentials,” can be viewed as being positioned on a line one after the other, and each value can be accessed by specifying exactly one index. For those reasons, accountBalances, along with the remaining arrays used in the previous chapter, are called one-dimensional arrays.

C# allows you to specify arrays of two dimensions, requiring two indexes to identify an array element, and arrays of three dimensions calling for three indexes. In fact, C# lets you specify ...

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