You will learn about the following in this chapter:

  • Why the idea of putting many values of the same type into the same data structure (the array) is so compelling

  • How to declare, define, initialize, and apply one-dimensional arrays

  • How arrays are effectively accessed with loop statements

  • The iteration statement foreach and how this statement, compared to the for-loop, can simplify access to an array

  • The implications of the fact that an array is a reference type.

  • How arrays can be provided as arguments to methods and as return values from methods

  • The implications of letting the values of an array be references to objects

  • The ability to let arrays be instance variables of classes and the associated advantages ...

Get C# Primer Plus now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.