Even for experienced programmers, C# introduces several new programming constructs. For example, as part of the section on data types, this chapter covered the type decimal that can be used accurately for financial calculations. In addition, the chapter introduced the fact that the Boolean type, bool, does not convert implicitly to an integer, thereby preventing the mistaken use of the assignment operator in a conditional expression. Other unique characteristics of C# are the @ verbatim string qualifier that forces a string to ignore the escape character and the fact that the string data type is immutable.
To convert data types between each other C# includes the cast operator in both an explicit and an implicit form. In the following chapters, you will learn how to define both operator types on custom types.
This chapter closed with coverage of C# syntax for arrays, along with the various means of manipulating arrays. For many developers, the syntax can become rather daunting at first, so the 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, appears as well.