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.

Essential C# 2.0
Essential C# 2.0
ISBN: 0321150775
EAN: 2147483647
Year: 2007
Pages: 185 © 2008-2017.
If you may any questions please contact us: