How can I pause the console window in .pl and .bat file?

后端 未结 3 1779
夕颜
夕颜 2021-02-08 04:28

As I know, when I run cs myConsoleApp.cs from windows command line, I can pause the Console Window by add the code below:

Console.ReadLine();

相关标签:
3条回答
  • 2021-02-08 04:56

    pause for .bat

    and

    <>; #Read from STDIN
    

    for Perl

    0 讨论(0)
  • 2021-02-08 05:09

    I don't know about in perl, but in a batch file it's easy:

    pause
    

    The help for this command states:

    Suspends processing of a batch program and displays the message
    Press any key to continue . . .

    0 讨论(0)
  • 2021-02-08 05:11

    <> for Perl works great. And yeah, pause is convenient for cmd.

    0 讨论(0)
提交回复
热议问题