Using Arrays

An array is simply a list or collection of items. Every array in the Common Language Runtime inherits from the System.Array class. Table 5.1 lists the terminology commonly used when talking about arrays.

Table 5.1. Array Terminology
TermDefinition
ElementAn item stored in the array
LengthThe number of elements the array can hold
RankThe number of dimensions of the array
Lower boundThe starting index for the array

In the following sections, you will learn how to create single-dimensional and multidimensional arrays. Then you will learn how to create and use a jagged array (array of arrays). Finally, you will learn how to pass an array as a parameter.

Understanding Single-Dimensional and Multidimensional Arrays

Single-dimensional and multidimensional ...

Get Microsoft® Visual C#® .NET 2003 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.