Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 98845

Console.ReadLine() not working in VS Code, writing a code in C#

$
0
0

I am learning C# and I am using VS Code, when I tried to take input from user using Console.ReadLine() it's not working.

I referred from a video which did exactly same thing and still after a couple of Google searches I couldn't figure out where I went wrong.

Console.WriteLine("Enter your name : ");
string name = Console.ReadLine();
Console.WriteLine("Hi! {0}", name);

My main method has only this 3 lines and it always gives as output something like this:

enter image description here

Screencast: enter image description here

It never prints the last line of code


Viewing all articles
Browse latest Browse all 98845

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>