Console throwing errors even though exercise is completed

I keep getting the following error in the console, even though the exercise is being marked as complete:
"Program.cs(10,58): error CS1002: ; expected [/home/ccuser/workspace/csharp-selection-statements-if-statements/workspace.csproj]

The build failed. Please fix the build errors and run again."
The URL changes depending on the exercise, but the rest is the same. As far as I can tell this mainly happens when the program should be printing something to the console. Again, the code is correct and is being counted as such, but I cannot see the actual results because the console is throwing this error. Anyone know what’s going on?

Hey @clutzyninja!
This is because C# requires you to have a semi-colon( ; ) at the end of each statement. The lesson however, does not require it for you to pass it. If you want to remove this error, just got to the line suggested in the error and add a semi-colon at the end. If you’re still having trouble, send us the code and a link to the exercise.

Hope this helps!
Steven

4 Likes