I'm having an odd issue with reading the output of a process in VS2010. I have redirected all the necessary streams as I should ( p.RedirectStandardOut = true etc) and getting hold of the standard output and placing it in a another stream is no problem.
However, when I read from the stream with outStream.ReadLine() , when there is nothing more to read the programme simply hangs. Is there any way to check that there is nothing in the stream?

Thanks in advance
M

Are you using a streamreader? If so, have you tried checking the reader.EndOfStream property?

I am using a streamReader, unfortunately, the EndOfStream property never seems to become true...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.