Why is the console window closing immediately once displayed my output?

前端 未结 21 2327
死守一世寂寞
死守一世寂寞 2020-11-22 03:45

I\'m studying C# by following the guides in MSDN.

Now, I just tried the Example 1 (here is the link to MSDN), and I\'ve encountered an i

21条回答
  •  礼貌的吻别
    2020-11-22 04:06

    According to my concern, if we want to stable the OUTPUT OF CONSOLE APPLICATION, till the close of output display USE, the label: after the MainMethod, and goto label; before end of the program

    In the Program.

    eg:

    static void Main(string[] args)
    {
        label:
    
        // Snippet of code
    
        goto label;
    }
    

提交回复
热议问题