Summary
In this chapter, you learned about the fundamentals of declaring, creating, and working with one-dimensional arrays.
The essential points discussed in this chapter are reviewed in this section.
Arrays can be useful for representing and accessing a small or a large number of similarly typed data items. Regardless of the number of items an array represents, it only needs one or two lines to be declared, and a loop construct can easily access different array element by referencing a single array name with a varying index.
Loop constructs a highly suited to traverse arrays.
When an array is created, its elements are initially and automatically assigned a default value. This value depends on the array element type.
After an array has been ...
Get C# Primer Plus 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.