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 trialAlec Price
213 Pointsnot sure what its asking the video didnt go into detail about variables being used this way
what forum can i find to ask questions besides here
var firstName = Console.ReadLine();
Console.WriteLine("firstName");
1 Answer
Gavin Schilling
37,904 Points- C# is not like Python; you have to assign a specific variable type when wanting a particular type.
- Also, you only quote that which you exactly want to quote. For variables, you do not quote it, so the program knows to search for its value in the code or imports.
string firstName = Console.ReadLine();
Console.WriteLine(firstName + " rocks!");
Jennifer Nordell
Treehouse TeacherJennifer Nordell
Treehouse TeacherHi there Gavin Schilling! I've moved your comment to an answer. This has the benefit of marking the question as "Answered" in the forums and allows for voting of your answer. On a side note,
var
is perfectly valid for this challenge and does not necessarily need to be explicitly told to be a string. Thanks for helping out in the Community!