Errata


Print Print Icon

Submit your own errata for this product.


The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.


Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question



Version Location Description Submitted By
Printed Page xvi
2nd paragraph

If you are a programmer who loves your code,...

should be:

if you are a programmer who loves his code,...

Anonymous 
Safari Books Online 2.2.4
Example 2-3

Line 61 reads:
subject = new( );
which generates a design-time error.

On lines:
63 Console.WriteLine((subject as ProtectionProxy).Authenticate("Secret"));
64 Console.WriteLine((subject as ProtectionProxy).Authenticate

When the novice C# reader sees this conversion, with the ambiguous new(), it's unclear that the program will only run without a NullReferenceException if subject = new ProtectionProxy.
Could lines 61,63,64 be considered redundant?

webster.net 
Printed Page 4
Aggregation

In the book it is written:
"A has a B, and B can outlive A"

I think correct is:
"A has a B, and A can outlive B"

Anonymous 
Printed Page 18
1st paragraph

ListTags does not exist on the Example 2-2.
ListTags --> ListTaggedPhotos

Anonymous 
Printed Page 19
Member variables of class TaggedPhoto

The variable "List <string> tags = new List <string> ();" of the class TaggedPhoto must be declared static.

Anonymous 
Printed Page 19
Member variables of class TaggedPhoto

The variable "List <string> tags = new List <string> ();" of the class TaggedPhoto must be declared static.

Anonymous 
Printed Page 19
variable declaration of TaggedPhoto class

List<string> is not declared static, so every instance of TaggedPhoto could only ever have one tag in the list, eg. ListTaggedPhotos will always only return one item.

Anonymous 
PDF Page 19
Sample code line #56, on the page 9th line.

The line:
List<string> tags = new List<string>();

Should be:
static List<string> tags = new List<string>();

To support the following output:

/* Output
TaggedPhotos: Food Yellow
TaggedPhotos: Food Yellow Jug
*/

Joel Enriquez 
PDF Page 23
Figure 2-5. Proxy pattern UML diagram

In order to fulfil the Proxy Pattern, the Subject class must implement the ISubject interface. This hasn't been done in the UML diagram.

Alan Cummings 
Printed Page 24
4th bullet

The 4th bullet item on this page is missing a closing parenthesis.

Anonymous 
Printed Page 33
Check() method

If you are going to make a call to Authenticate() in the method it should be unconditional if
password != null, otherwise the logic is not consistent.

Anonymous 
Printed Page 102
UML diagram

Class's name 'Class' should 'Client'

Anonymous 
Printed Page 207
Last method public void Output

I was not familiar with the InvokeRequired property, so I looked it up on MSDN and I noticed
somethingthere that might be important to note or add to your book. Basically you should check
IsHandleCreate when InvokeRequired is false, otherwise some possible bad things could occur.

Anonymous 
Printed Page 229
Example 10-2

The program, which is presented as a complete program, does not compile using Visual Studio 2008's C#
3.0 compiler. The specific errors I get when I attempt to compile the program are the following:

Error 1 The name 'VisitAllLabTest' does not exist in the current context C:Documents and Settings
miesenMy DocumentsVisual Studio 2008ProjectsLearningAdventuresVisitorPatternFunVisitor
Pattern FunProgram.cs 41 34 Visitor Pattern Fun

Error 2 The name 'VisitAllLabTest' does not exist in the current context C:Documents and Settings
miesenMy DocumentsVisual Studio 2008ProjectsLearningAdventuresVisitorPatternFunVisitor
Pattern FunProgram.cs 42 34 Visitor Pattern Fun

I did some research into the problem and it appears that the author of this example did not declare
and define the VisitAllLabTest() method.

Anonymous 


"If you already understand the C# programming language and have some introduction to Patterns under your belt, this book will be very exciting to you as it opens up the field to completely new possibilities."
--Peter Bromberg, EggHeadCafe.com