Thread: Chapter03
View Single Post
  #2 (permalink)  
Old February 13th, 2016, 03:02 PM
workNhard workNhard is offline
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2016
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Errata - code error on page 155

I didn't see the errata posting area for this book so I thought I would post it here.

The code on p. 155 ...

Code:
int i = 1;
do
{
   WriteLine("{0}", i++);
} while (i <= 10);
should be ....

Code:
int i = 1;
 do
 {
    WriteLine($"{i}", i++);
} while (i < 10);
Reply With Quote