0
It is not asking for user input in visual studio.
I used console.readline and all the code is right.
6 Antworten
+ 1
On the last line, the comma should be on the right of the closing quotation marks.
0
If you give us the code you used we could help you. Right now we can't do anything to help you.
0
This would be where the problem is
{
string yourName;
Console.WriteLine("What is your Name?");
yourName = Console.ReadLine();
Console.WriteLine("Hello," yourName);
}
0
Also how do I view what a user would be viewing in visual studio?
0
Your last code must have {0} after "Hello "
like this:
Console.WriteLine("Hello {0}," yourName);
0
both answers below only give half an answer. if you intended to use a placeholder you are both missing the {0} and the comma is the wrong position.
Console.WriteLine("Hello {0}", yourName);
however if you did not intend to use a placeholder all you are missing is the + sign:
Console.WriteLine("Hello, " + yourName);