Errata

C# 5.0 Pocket Reference

Errata for C# 5.0 Pocket Reference

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 Note Update

Version Location Description Submitted by Date submitted
Printed Page 41
middle of page

On page 41, it should be
Console.WriteLine( Sum (new int[] {1, 2, 3, 4} ) );
(which is equivalent to Console.WriteLine(Sum (1, 2, 3, 4)); )
Rather than Console.WriteLine(new int[] {1, 2, 3, 4});

Anonymous  Jun 17, 2013 
Printed Page 41
3rd code fragment, just above section "Optional Parameters"

The code example, accompanying the discussion of the params modifier, includes this line of code:

Console.WriteLn (Sum (1, 2, 3, 4 ));

The authors then state that the given line is semantically equivalent to the following line:

Console.WriteLn (new Int[] { 1, 2, 3, 4 } );

I believe that last line ought rather to be:

Console.WriteLn (Sum (new Int[] { 1, 2, 3, 4 } ));

Anonymous  Mar 08, 2016 
PDF Page 47
Line 6 in the table


-- Post-increment --x


I think it should be Pre-decrement.

Thanks
Tanay Kumar

Tanay Kumar  Oct 11, 2017 
Printed Page 48
immediately following the Conditional Or operator

The Null Coalescing operator, described on pages 135 and 136, is missing from the operator table on pages 46 through 48. It should immediately follow the Conditional Or operator.

Anonymous  Mar 08, 2016 
Printed Page 57
First paragraph, direcatly after the "note" section

The word "namespace" is incorrectly spelled as "namepace".

The sentence is:
The "namepace" keyword defines a namespace for types within that block.

Liam Flanagan  Apr 25, 2013 
PDF Page 147
Australia



var numbers = new List<int> { 1 };
numbers.Add (1);
IEnumerable<int> query = numbers.Select (n => n * 10);
numbers.Add (2); // Sneak in an extra element
foreach (int n in query)
Console.Write (n + "|"); // 10|20|


The list ends up being size 3, so the correct output is:

10|10|20|


not

10|20|

Craig Thoman  Feb 26, 2014 
Printed Page 147
code block after 1st para

Confirming that the same error mentioned above by Craig for page 147 of the PDF version applies to the Print version as well (as of the 3rd Release).

Will Gray  Apr 05, 2014