Visual Studio terminates my console application too fast

前端 未结 5 680
温柔的废话
温柔的废话 2020-12-21 19:12

When I execute my program in Visual Studio (just a simple hello world app) it terminates and closes the console window immediately, rather than waiting for me to close it ma

5条回答
  •  攒了一身酷
    2020-12-21 20:10

    This is by design and your instructor is incorrect. Try launching a .bat file from a folder view and you get precisely the same behaviour!

    You can

    • Set a breakpoint

      Ask for user input via Console.Readline()

      Run to cursor

提交回复
热议问题