Question

I was just wondering really if there was an easy way to redirect the output from a StreamReader (in my case one from a NamedPipeClientStream) to the input of a StreamWriter (in my case the one in Console.Out).

Of course you could do this fairly easily with a simple while loop redirecting the data but at the same time I also want to redirect the console's input to a stream writer and out to the Pipe.

I could do it with threads but it seems a bit of a waste of a thread... So I ask, is there a nice way to link streams together?

Been at this all day and I haven't found an easy way yet :/

Was it helpful?
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top