O'Reilly logo

C# 2010 for Programmers, Fourth Edition by Harvey M. Deitel, Paul J. Deitel

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

8. Arrays

Objectives

In this chapter you’ll learn:

• To use arrays to store data in and retrieve data from lists and tables of values.

• To declare arrays, initialize arrays and refer to individual elements of arrays.

• To use the foreach statement to iterate through arrays.

• To use implicitly typed local variables.

• To pass arrays to methods.

• To declare and manipulate multidimensional arrays.

Begin at the beginning, ... and go on till you come to the end: then stop.

Lewis Carroll

Now go, write it before them in a table, and note it in a book.

Isaiah 30:8

To go beyond is as wrong as to fall short.

Confucius

Outline

8.1 Introduction

8.2 Arrays

8.3 Declaring and Creating Arrays

8.4 Examples Using Arrays

8.5 Case Study: Card Shuffling ...

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