C# 7.0 in a Nutshell

Errata for C# 7.0 in a Nutshell

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. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

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



Version Location Description Submitted By Date Submitted Date Corrected
Printed
Page 59
sixth line

I find it surprising to see Elvis listed among the "Unary operators." Surely it is binary.

Note from the Author or Editor:
The null-conditional operator (?.) should actually be in the *primary* category. Move this table row to the second row in the table, below ". Member Access x.y"

Kim McCall  Feb 13, 2018  Sep 21, 2018
Printed
Page 60
Second actual paragraph

In discussing the ?? operator you say "If the operand is . . ., as though there were only one operand. I'd suggest "if the left operand " or "If the first operand."

Note from the Author or Editor:
“If the operand to the left is non-null, give it to me; otherwise, ...

Anonymous  Feb 13, 2018  Sep 21, 2018
Printed
Page 61
1st paragraph

Very minor issue. Since we're now on C# 7, I'd suggest changing "The ?. operator ... is new to C# 6" to "The ?. operator ... wasnew to C# 6" or (better) "The ?. operator ... is introduced in C# 6."

Note from the Author or Editor:
The ?. operator is the null-conditional or “Elvis” operator (after the Elvis emoticon), and was introduced in C# 6.

Kim McCall  Feb 13, 2018  Sep 21, 2018
Printed
Page 114
Paragraph beginning "Because both . . ."

You should remove the word "both."

Kim McCall  Feb 15, 2018  Sep 21, 2018
Printed
Page 123
3rd code bock

In the fourth line of the code, which is the assignment statement, you should make the second occurrence of "int" bold, too.

Kim McCall  Feb 15, 2018  Sep 21, 2018
Other Digital Version
170
1st example on public struct Point

You create 2 Point structures: Point p1 = new Point(); // p1x and p1.y will be 0 Point p2 = new Point(1,1); // p1.x and p1.y will be 1 This is incorrect, p1.x and p1.y will be 0, p2.x and p2.y will be 1. This was proved in debug mode in Visual Studio 2017.

Note from the Author or Editor:
Note that this is on page 110 of the printed edition. The line in question should read: Point p2 = new Point (1, 1); // p2.x and p2.y will be 1

Paul Tooley  Dec 07, 2017  Sep 21, 2018
Printed
Page 183
Examples in paragraph after the caution.

The comment, for the first line of example code, contains a typo. The variable names, in the code, are "joe" and "bob". Where the comment refers to them as "joe" and "job". var joe = bob; // joe is a *copy* of job Should be: var joe = bob; // joe is a *copy* of bob

Frank Robertson  Apr 19, 2018  Sep 21, 2018
Printed
Page 443
table at the bottom

Description for "AsEnumerable" method should be: "Upcasts to IEnumerable<T>" instead of "Downcasts to IEnumerable<T>". The description on page 446 is already correct: "AsEnumerable upcasts a sequence to IEnumerable<T>, ...".

Note from the Author or Editor:
Thank you. This will be revised in the next printing and online.

Dariusz Dacko  Mar 03, 2018  Sep 21, 2018