Does STDIN / STDOUT dump data at a time or character by character?
by default, StandardOutput is buffered, which means you will probably receive whole messages from the other end (or multiple whole messages). But this is not really guaranteed, especially since the process you are reading might change the buffering of StandardOutput.
A message terminator would be the best way to figure this out. although usually with processes exchanging the StandardOutput standard, all strings are based so simply using newlines, as message terminators are probably the easiest and most common place to start.
a source to share
reader.ReadToEnd()
doesn't return until the process exits, so after this call you should see everything it wrote to stdout. Buffering will only affect how quickly it gets from another program into the reader's buffer, but your code can't tell the difference (at least from this stream) because it's still waiting to return ReadToEnd()
.
a source to share