+ 2
Why isn't my console showing up?
Whenever I try to run a code for C# in Visual Studio, for, let's say a text message should appear, it only flashes the console for about a second before closing down again. How do I prevent this?
5 Respostas
+ 4
Try adding Console.ReadKey() at the end of your main method. IIRC, Visual Studio doesn't keep the window open unless it blocks. So, what's really happening is that the message is printing, but the program ends as soon as it is printed, so VS closes the console.
+ 5
[No Name] Seeing your problem was resolved already it would be great if you can mark the answer that you find useful to encourage the community to help each other out. 😉
+ 3
Btw I just got into coding, so please don't get rough on me >_<
+ 2
Oh wow, thanks for replying so fast! I tried putting it in and it works like a charm, thanks for the help :)
0
It works, but I'm used to IntelliJ IDE where the console permanently lives in the bottom portion of the screen, so I can see it all the time. Whereas the Console.ReadKey() just keeps it open as a separate window. Any advice?