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 trialRa Bha
2,201 PointsHello, is it recommended that we type out what's happening on the lesson into the Workspace during the lessons? Thanks!
The lesson mentions launching a workspace but then doesn't explicitly say that we should type what's being referred to by the instructor onto the Workspace. I'm just checking whether that's the expectation for highest quality of learning and instruction. Thank you!
3 Answers
Jennifer Nordell
Treehouse TeacherHi there, Ra Bha! I would highly recommend doing that. In my experience, students who do not type along tend to encounter more syntax errors later. The more you type along, the more second-nature some things will become, like adding a semicolon at the end of a statement. It may not seem like a big thing now, but later when your code won't compile because of a missing semicolon, you might wish you'd gotten in the habit early
Hope this helps!
Jesse Kill
42 PointsHello there,
I tried following along in the video. When I typed this out:
class Program
{
static void Main(string[] args)
{
var number = 4;
var gretting = "hello";
system.console.writeline(number);
system.console.writeline(greeting);
}
}
But got three errors:
Program.cs(8,34): error CS0103: The name 'greeting' does not exist in the current context [/home/treehouse/work
space/workspace.csproj]
Program.cs(6,13): warning CS0219: The variable 'gretting' is assigned but its value is never used [/home/treeho
use/workspace/workspace.csproj]
What have I done wrong?
Cheers, Jesse
Jennifer Nordell
Treehouse TeacherHi there, Jesse Kill! First, capitalization matters. If you're programming, you should assume that literally everything is case-sensitive. This even includes file and folder names.
You have:
system.console.writeline();
But that should be:
System.Console.WriteLine();
Secondly, you have a spelling error. At first, you created a variable named gretting
, but you meant for it to be greeting
. Check the number of "t"s and "e"s.
Hope this helps!
Ra Bha
2,201 PointsHello Jesse, one thing I kept doing wrong was forgetting to save the file each time I updated the code. This may or may not be an issue for you but do remember to save the file each time you run the code in Console in the Workspace. Otherwise, the Console will run the previous code that was saved, not what is in your file presently.
Hope this helps.