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 trialGlen Tyree
6,997 PointsCopy and pasted provided code and I get an error CS1514. Im not sure how to move forward in the lesson now?
Copy and pasted provided code and I get an error CS1514. Im not sure how to move forward in the lesson now?
Glen Tyree
6,997 PointsHere is that snapshot. https://w.trhou.se/9ojm1c87us
Glen Tyree
6,997 PointsMy bad here is the right snapshot. https://w.trhou.se/xvcj6wj3ob
1 Answer
Steven Parker
231,236 PointsYou said you "Copy and pasted provided code", but the code in your workspace is very different from what is supplied in the teacher's notes along with that video. In particular:
- you have "Treehoude" instead of "Treehouse"
- you're missing the open brace after the namespace (and the close at the end)
- you call "Console.ReadLline" twice instead of once
- you have just "WriteLine" instead of "Console.WriteLine"
And it won't prevent the code from compiling, but the sample code has a loop and yours does not.
But if you fix these it should get you going again.
Glen Tyree
6,997 PointsHere is the right snapshot. https://w.trhou.se/u5bx5n66ud
Steven Parker
231,236 PointsThe code in your new snapshot is also different from the code provided in the notes, but this time only by the addition of a new variable that is initialized but never used
This causes a warning (not serious) during compilation, but otherwise the program compiles and runs with no errors.
Steven Parker
231,236 PointsSteven Parker
231,236 PointsTo facilitate analysis of your issue, make a snapshot of your workspace and post the link to it here.