C# in Depth

Cover of C# in Depth
Order now (3rd edition)

(You are currently looking at the first edition version of this page. This page is also available for the second and third editions.)

Errata for Chapter 7: Concluding C# 2: the final features

P186, line 7: Incorrect bullet icon

The sentence beginning on line 7 of page 186 reads:

Only (1) specified any type constraints, and only (2) specified a base class.

The base class is specified at bullet point 3, so the sentence should read:

Only (1) specified any type constraints, and only (3) specified a base class.

P195: Emphasize introduction of WinForms class

Listing 7.6 has the WinForms::Button and WebForms::Button in bold, but not the introduction of class WinForms. It's easy to assume that the only changes between listing 7.5 and 7.6 are the changes to alias syntax, at which point it's not clear why you need it. The listing should look like this:

using System;
using WinForms = System.Windows.Forms;
using WebForms = System.Web.UI.WebControls;

class WinForms
{
}

class Test
{
   static void Main()
   {
      Console.WriteLine (typeof (WinForms::Button));
      Console.WriteLine (typeof (WebForms::Button));
   }
}