문제

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 :/

도움이 되었습니까?
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top