Chapter 3: Summary

We began the chapter with a discussion of two different categories of types: value types and reference types. These fundamental concepts are important for C# programmers to understand because they change the underlying way a type behaves, even though that might not be obvious when reading through the code.

Before discussing arrays, we looked at two language constructs that were not initially part of C#. First, we introduced the nullable modifier (?). The nullable modifier enables the declaration of nullability. (Technically, it enables value types to store null and reference types to specify explicitly the intent to store null or not.) Second, we introduced tuples and a new syntax introduced with C# 7.0 that provides language support for working with tuples without having to work explicitly with the underlying data type.

This chapter closed with coverage of C# syntax for arrays, along with the various means of manipulating arrays. For many developers, the syntax can seem rather daunting at first, so this section included a list of the common errors associated with coding arrays.

The next chapter looks at expressions and control flow statements. The if statement, which appeared a few times toward the end of this chapter, is discussed as well.

{{ snackbarMessage }}
;