This is a very disappointing book, especially since it is from an experienced author of some excellent books. The author’s strategy is to introduce language features as they prove useful. The book is written for programmers, and at first glance appears pleasant. Large type and the use of the Courier font for emphasis make it easy to read. A bottom-up approach through examples might be feasible for programmers who use their experience to catch on quickly. However, this book hinders rather than helps the learning of C#.
Complete programs do not appear in the text. There are snippets of code, but these appear without any indication as to which program they are from. The programs available on the author’s Web site often have an indecipherable relation to the text. These programs are poorly formatted with large indents that cause the lines to wrap, making them hard to read. Programs occur that have little relation to anything in the text, and sections of the text have code snippets that have no discernable program containing them.
This book fails from the start. Page 10 in chapter 1 states “In the rest of this chapter we’ll explore the predefined elements of the C# language as we implement a small program called WordCount.” I looked in vain for a WordCount program in the chapter1 folder of the programs. Only fragments of code appear in the text. Later, I did find a WordCount program in the chapter2 folder, which probably explains another defect. Section 2.2 opens a Visual Studio project. This is the first mention of how to run a C# progam, an omission that seemed very strange in chapter 1. I conjecture that chapters 1 and 2 were at one time joined.
C# is much like Java, but has some interesting new features. I turned to Section 2.12, the delegate type, one of the new features, but the fragments in this section seemed to have no relation to the chapter 2 programs. I looked at Section 5.10, System.Data, for information about database access with C#, but no code relating to this section appears in the downloaded programs for chapter 5. The insufficient fragments in the text refer to a Microsoft Access database. However the downloaded programs that use System.Data seem to refer to Microsoft SQL Server, and have a cryptic comment about changes, leaving one to wonder whether the text is outdated.
The book contains eight chapters. The first four treat elements of the C# language, while the last four introduce aspects of the .NET framework. The C# specification from Microsoft provides a well-written discussion of the language, with examples that one can easily copy and paste to execute. A book should add some value to what one can obtain from the specification. This book adds obstacles and difficulties instead.