Multi-dimensional arrays
The arrays in the C# language do not need to have only one dimension. It is possible to create two-dimensional arrays as well. As you will see, multi-dimensional arrays are very useful and are frequently used while developing various applications.
Imagine a two-dimensional array
If you want to imagine a two-dimensional array, take a break, close your eyes, and play Sudoku. If you don’t know what this is, Sudoku is a popular game that requires you to fill empty cells of a 9x9 board with numbers from 1 to 9. However, each row, each column, and each 3x3 box can only contain unique numbers. Surprise – this board forms a two-dimensional array! You can point to any place on the board by specifying its row and column, the same as in the case of a two-dimensional array. And if you are a bit tired of solving such puzzles with a pencil and a piece of paper, take a look at Chapter 9, See in Action, where you will learn how to create an algorithm for...