Java's PipedReader / PipedWriter equivalents in C#?

Posted by devoured elysium on Stack Overflow See other posts from Stack Overflow or by devoured elysium
Published on 2010-12-24T19:50:04Z Indexed on 2010/12/24 19:54 UTC
Read the original article Hit count: 99

Filed under:
|
|

I have defined a Pipe class in Java, making use of PipedReader and PipedWriter. I am now trying to port this same class to C#. Is it possible to accomplish the same as shown in the following code in C#?

public final class Pipe {
    private final PipedReader pipedReader = new PipedReader();
    private final PipedWriter pipedWriter = new PipedWriter();

    public Pipe() {
        pipedWriter.connect(pipedReader);
    }

        ...
}

I am guessing what I'll want to use in C# for PipedReader and PipedWriter will be StreamReader and StreamWriter?

Is there something like a connect() method?

Thanks

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET