+ 2
Do i need to write Console.ReadKey() in new versions C#?
5 Respostas
+ 1
I use this to prevent the program from closing immediately. For example, when I want to display text on the screen. I saw this in YouTube tutorials
+ 1
http://csharp.net-informations.com/overview/csharp-console-application.htm#:~:text=How%20to%20stop%20C%23%20console,lose%20Visual%20Studio's%20debug%20information.
You can use console.readkey for this. But also ctrl-F5
+ 1
Thanks 👍
0
You can still use it, but it is not mandatory. When do you use it ?
0
Yes, Using this will not terminate the console immediately.
You can use it in new version too.