Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

Sean Flanagan
Sean Flanagan
33,233 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 ;