Errata

C# 4.0 Pocket Reference

Errata for C# 4.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 19
1st paragraph

IN page 19,there is a paragraph as:
The set of predefined value types, excluding decimal, are known as
primitive types in the CLR.Primitive Types are so called because they are supported directly via instructions in compiled code,which usually translate
to direct support on the underlying processor.

Question:
1. Why not decimal,it is also in System
2. Is it the same at all .NET languages supported by .NET framework and CORE?
3. Is it the same in CORE

Your answer will be immensely helpful for my understanding.

Sivanathan B  Feb 10, 2021 
Printed Page 47
Between "Conditional Or" (7th section) and "Conditional" (8th section)

Null Coalescing operator (??) is missing from the Operator Table that begins on page 45. The precedence of this operator is below the Conditional Or (||) operator and above the Conditional (? :) operator.

Gregg Lobdell  Dec 05, 2012 
PDF Page 23
First code example

page 23 line
int a = 1000000, int b = 1000000;
will not compile using visual studio 2010

fix -
1) replace comma ',' with semi-colon ';'
or
2) remove 2nd occurance of 'int' in the line

Mark Ketter  Mar 16, 2011 
PDF Page 156
Fluent syntax version of "let" example

In the fluent syntax version of the "let" keyword example, the first "Select" statement should assign the temporary anonymous type to "temp0", not to "n". This should read:

.Select (temp0 => new { n = n,...

JamesPreston  Feb 26, 2011 
PDF Page 164
Source code for Cast

The "Cast" method is an extension method and so the "this" modifier should be applied to the method parameter. The correct method signature should be:

public static IEnumerable<TSource> Cast <TSource>(this IEnumerable source)

JamesPreston  Feb 26, 2011 
PDF Page 156
3rd paragraph

The first sentence of the paragraph reads "...by projecting into temporary anonymous type..." missing out the "a" between "into" and "temporary".

JamesPreston  Feb 26, 2011 
PDF Page 145-146
Deferred Execution code sample

In the code sample, the list "numbers" is populated with three values - 1, 1 and 2 - but the expected output shown in the comment on the last line only has two values - 10 and 20. Either the number 1 should not be added twice to the list (once via the list initialization and once via the Add method) or the expected output should be "10|10|20|".

JamesPreston  Feb 26, 2011 
PDF Page 56
First paragraph following "Note"

At the start of the paragraph ("The namepace keyword"), "namespace" is misspelled as "namepace".

JamesPreston  Feb 26, 2011 
PDF Page 38
Table of parameter modifiers

In the second line of the table, the "ref" parameter modifier should not have an initial capital. i.e. it should be "ref", not "Ref".

JamesPreston  Feb 26, 2011