Console output

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • danasegarane
    New Member
    • Mar 2007
    • 32

    Console output

    Hi all,
    I found this ( http://dotnet.mvps.org/dotnet/samples/misc/#RedirectConsol e)one to read the console output by line by line.But I am unable to detect the finishing of the console.output. How can I detect that the console application is finished

    Thanks in Advance
    Dana
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    The console output is "finished" when the console is closed. Which would close the stream.

    Comment

    • danasegarane
      New Member
      • Mar 2007
      • 32

      #3
      Dear Plater,
      Can u be Brief ?

      Dana

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        The console input/output/error is treated as a stream.
        Unlike a filestream which has a definitive end (end of the file) the input stream does not have an end until it is closed.

        Comment

        • danasegarane
          New Member
          • Mar 2007
          • 32

          #5
          Is there any method avl to detect that the console is finshed executing the code ?

          Comment

          • Plater
            Recognized Expert Expert
            • Apr 2007
            • 7872

            #6
            Is this console from another program that you are redirecting it?
            Just watch for the end of the proccess?

            Comment

            • danasegarane
              New Member
              • Mar 2007
              • 32

              #7
              I am only Redirecting

              Comment

              • Plater
                Recognized Expert Expert
                • Apr 2007
                • 7872

                #8
                So you are starting a process and redirecting it's stdio streams into your own project. So watch for when the process ends to determine when it's done.

                Comment

                Working...