Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C# C# Basics (Retired) Console I/O Formatting Output

Sean Flanagan
Sean Flanagan
33,235 Points

Error on different line to the one reported

When Jeremy got an error message, it was reported to be on line 20 but it was actually line 16 that was missing a semi-colon at the end. And the number of characters on line 16 was a lot more than 9.

1 Answer

Hi Sean,

Yes, what gets reported is the place at which the compiler discovers that an error has been made. Line 20, column 9 is the place where the compiler comes across the } when it was expecting a ;

So you have to start at that location and then backtrack to find the place where you missed the ;