Anyone with any experience using Visual Studio for Windows Forms development may want to skip the first section and start right in with "Section 2 - The C# Language Essentials". These 8 chapters serve as an introduction to the building blocks of the C# programming language, covering how to work with different variable types, code control structures, exceptions, methods, and events. When looking at this section's topics in the table of contents it doesn't appear that they appear in any particular order, but when reading the chapters sequentially everything seems to flow nicely.
"Chapter 4 - How to work with numeric and string data" begins by explaining the basics of working with value type variables, and covers declaration and initialization, arithmetic and assignment expressions, order of precedence, and casting. This chapter provides a very solid foundation for working with value types, specifically using strings and numeric variables to illustrate how and why to cast values to specific types, how to create formatted string representations of different types (using the String.Format method), and includes a brief mention of the Math class and its associated methods (the StringBuilder and the differences between mutable and immutable string values are covered in a later chapter).
The next chapter ("How to code control structures") introduces relational and logical operators, conditional statements ("How to code if-else statements", "How to code switch statements"), and loop constructs ("How to code while and do-while loops", "How to code for loops").
Chapter 6 is a discussion on "How to code methods and event handlers", expanding on what is covered in the first section of the book by detailing the differences betwen value and reference parameters, using Visual Studio 2005's refactoring feature to convert a block of code into its own method, and explaining in detail how events and event handlers work ("How to work with events and delegates", "How to generate an event handler for an event", "How event wiring works", "How to handle multiple events with one event handler").
The next chapter ("How to handle exceptions and validate data") begins by covering exception handling, explaining the specifics of the proper handling of exceptions through structured try-catch blocks, and introducing the proper reasons and methods for throwing exceptions in your code.
Following is a chapter on arrays and collections, covering the use of single- and multiple-dimensional arrays ("How to work with one-dimensional arrays", "How to work with rectangular arrays", "How to work with jagged arrays") and collections ("Commonly-used collection classes", "Typed vs. untyped collections"). The array discussion ends with more advanced examples of how to manipulate arrays ("How to refer to and copy arrays", "How to code methods that work with arrays"), and the collection discussion details the different built-in collections (including list, sorted list, queues, and stacks) and how and when to use each.
"Chapter 9 - How to work with dates and strings" extends the previous discussion of formatting strings, introduces the DateTime and TimeSpan structures, and explains how to manipulate, compare, and format date-related values.
Moving back to the sample application, the next chapter begins with examples of working with some of the more common controls (comboboxes, listboxes, checkboxes, radio buttons, and groupboxes), explaining tab order, and then illustrating how to use the Visual Studio reference documentation to learn more about the controls not covered in the book. The next discussion is about using multiple forms in one application ("How to work with a multi-form project", "How to use the MessageBox class", "How to display a dialog box and get the user response", "How to use the FormClosing event"), ending with example code integrating everything discussed in the previous chapters into the sample project that is used throughout the book.
The last chapter in this section, "How to debug an application", covers the debugging features of Visual Studio including break mode, edit and continue, breakpoints, the various debug windows (Watch, Locals, Autos, and Call Stack), and the use of Visual Studio 2005's new visualizers to view variable content. Not mentioned are the System.Diagnostics.Debug class, the different build configurations, or conditional compilation constants; all of which might have fit nicely in this chapter.
Walkthrough: Section 3
The third section of "C# 2005" covers object-oriented programming, including class and structure design, indexers, delegates, events, inheritance, interfaces, and generics. Beginning programmers may be well served to take a break between sections 2 and 3 and become more familiar with everything they have learned up until that point, because these are advanced concepts relative to what is covered in the previous chapters.
The section starts off with a comprehensive chapter covering class design, beginning with an introduction to the concepts of using classes ("How classes can be used to structure an application", "The members you can define for a class", "How instantiation works"), moving into the details of class design (covering fields, properties, methods, constructors, and static methods), and closing with a discussion of how to create and use structures.
Chapter 13 covers a few miscellaneous class design concepts, including the use of indexers, delegates, events, and operators. Operator overloading is explained, at which time the author also explains the use of the virtual Equals and GetHashCode methods of the base Object class.
The next topic covered is inheritance. The chapter begins with an overview of class inheritance, a correlation to how inheritance is used in the .NET framework classes, and an explanation of how inheritance can be used by the reader to develop robust applications. Specifics are then covered ("How to create a base class", "How to create a subclass", "How polymorphism works"), and related code examples are given via the book's sample application. Before moving on, the Type class, casting inherited classes, and the concepts of sealed and abstract classes are discussed. Inheritance can be a tricky concept to pick up, and the author does a great job of explaining the process conceptually and then by example in this chapter.
Chapter 15 introduces interfaces and generics. The first part ("How to work with interfaces") walks the reader through interface implementation concepts and practices in much the same fashion as the previous chapter did with inheritance, illustrating some of the common interfaces defined within the .NET framework and how and why to implement them. Also covered is referring to instantiated classes by their interface and passing interfaces as parameters, key points towards understanding why use of interfaces is important towards proper object-oriented development.
The pages about generics introduce this concept (new to Visual Studio 2005), illustrate how to code classes that use generics ("How to code a class that defines a generic collection"), introduce some generic interfaces in the .NET framework library and how (and why) to use them ("How to implement the IComparable<> interface", "How to implement the IEnuerable<> interface"), and illustrate how to write interfaces that use generic members ("How to code an interface that uses generics", "How to use contraints").
"Chapter 16 - How to organize and document your classes" rounds out the section by introducing the Visual Studio Xml documentation methods, examining class libraries ("How class libraries work", "How to create a class linrary project", "How to add a reference to a class library"), and discussing the different ways to define classes (more than one class per file, partial classes across multiple files) in Visual Studio 2005.
Walkthrough: Section 4
Section 4 serves as an introduction to database programming, beginning with a tutorial on relational database design ("An introduction to database programming") that nicely covers basic and even intermediate relational database concepts and practices such as table design, indexing, queries, and joins. Rounding out this chapter is an overview of ADO.NET, which illustrates the concepts behind .NET's data connectivity library (".NET data proividers", "How the basic ADO.NET components work", "Concurrency and the disconnected data architecture")and introduces the key players ("How a dataset is organized", "How to work with data without using a data adapter").
The first half of the rest of this section covers using data binding to bind controls to data sources. Chapter 18 walks the reader through the process of creating a data source using the Data Source Confguration Wizard, and how to bind it to a DatagridView control (the new DataGrid introduced in Visual Studio 2005), a TextBox control, and a ComboBox control. Throughout this chapter, the author throws in additional information such as data source-specific error handling ("How to handle data provider errors", "How to handle ADO.NET errors") and nicely anticpates issues such as formatting ("How to format bound data") and query building ("How to create a parameterized query", "How to preview the data for a query", "How to view the schema for a dataset").
Chapter 19 continues the data source discussion by introducing the DataSet Designer and Query Builder as vehicles for automating data connectivity in Visual Studio applications ("How to use the DataSet Designer"), a discussion of typed datasets ("How to use code to work with a binding source or dataset"), and more advanced use of the DataGridView, specifically how to create a Master / Detail form. All of the concepts in the last two chapters are summarized using code samples from the sample application.
After covering data binding and the automated data access methods available to C# programmers, the author moves on to describe the programmatic methods of data access in "Chapter 20 - How to use ADO.NET to write your own data access code". If the previous ADO.NET data access methods are akin to teaching someone how to drive a car, this chapter is like opening the hood and handing them a wrench. Topics covered are "How to work with connections and commands", "How to execute data commands", "How to work with datasets and dataadapters", and "How to work with transactions".
The last chapter in the data access section takes the reader into advanced territory by explaining data-bound application architecture, examining the different layers of a networked and database-driven system and showing (by example) how classes can be made data-aware and bound to controls just like ADO.NET data sources. Just the inclusion of these topics in a book that is otherwise geared to those just starting out with C# programming shows that Murach is dedicated to showing his readers the paths to advanced topics, giving them the option to explore them further when they are ready.
Walkthrough: Section 5
The last section in the book, "Other Skills for C# Developers", is a collection of assorted techniques, namespace overviews, and design practices, all of which are prerequisites to creating a production-ready application. Topics covered range from file I/O to Xml to UI design practices and deployment.
First up in this section is a chapter on using the System.IO namespace to access folders and files on disk. Just an overview (the details of working with streams are mostly glossed over), this chapter is an introduction to reading and writing text and binary files using the TextReader / TextWriter and BinaryReader / BinaryWriter classes.
"Chapter 23 - How to work with Xml files" beings with an introduction to Xml document syntax, breaking down tags, declarations, comments, elements, and attributes, and showing the reader how to edit Xml files in Visual Studio using the Xml Editor. The chapter closes with a discussion of using the XmlReader and XmlWriter classes to read and write Xml. Again, the chapter just starts the reader down the path, making no mention of the XmlDocument class or any other advanced topics such as DTD or XSLT (which are complex enough to merit a book of their own).
The next chapter outlines user interface design best practices, discussing SDI (Single-document Interface) and MDI (Multiple-document Interface) application designs, tab controls, menus, toolbars, and help integration basics. Like the other chapters in this section, these topics are only briefly touched upon, but there is enough information provided to ensure that beginner programmers will be able to build a standardized user interface without difficulty.
Completing the book is a chapter on application deployment, which examines the different methods of deploying a compiled program. After introducing the concepts behind XCopy, ClickOnce, and a Setup program, the options for using each are described. The chapter is rounded out with a discussion about database application deployment options, covering each model (networked database application, client database application, and Web server database applications).
C# 2005 by Joel Murach is a comprehensive tutorial that properly introduces beginner developers or programmers new to C# to the gamut of language and IDE features available to them in Visual Studio 2005. I would also recommend this book as a reference or tutorial to experienced developers who are interested in rounding out their object-oriented programming or data access techniques, or who are interested in learning more about the features introduced to .NET and C# in Visual Studio 2005.
The tone of the book and its organization and paired page layout are very conducive to learning at any level, and the topics covered are varied enough to ensure a well-rounded learning experience, regardless of the reader's development background.