Use Console.WriteLine to print the contents of the firstName variable to the screen.
Task 2 of 3
string firstName = Console.ReadLine(); Console.WriteLine ("firstName");
Steven Parker187,274 Points
Never put quotes around a variable name. That creates a string literal instead of referencing the variable.
What you are doing here is creating a string (a variable) named
firstName in your program and setting it to whatever the user inputs. This part is correct.
The 2nd line is where you have trouble. You are not referencing the variable
firstName you created on the previous line, but are instead passing in the string
"firstName" instead of the variable. Basically your code will always print out "firstName", regardless of what the user types in. In order to print what the user types in, you need to use the variable
firstName (without the quotes). This is the actual variable you stored the input in, not just some text in your code.