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 trialJames Pirrie
137 PointsDeclare a variable using a string Console.Readline(). Am I missing something, can't seem to do it right?
Help
Console.Readline=firstname"Jeremy";
Steven Parker
231,248 PointsThat's not quite it either. See my hints.
1 Answer
Steven Parker
231,248 PointsDeclare the variable first, using "var" or "string" and then the name, follow with the equal-sign and then call the function. Remember to put parentheses () after the function name. Finally end the statement with a semicolon. You won't need an actual name here, it will be input by the user.
Remember to spell "firstName" with a capital "N" and "ReadLine" with capital "L".
Benny Ogidan
17,948 PointsBenny Ogidan
17,948 Pointsstring firstname = "Jeremy"; Console.Readline(firstname);