C# Streams
Does anyone know how to convert this Java code or C++ code to C#. The C# StreamWriter constructor takes a stream as an argument.
Java:
Class Example
{
private PrintStream _myOut;
public Example(PrintStream s)
{
_myOut = new PrintStream(s);
}
public static void main(String args[])
{
Example e = new Example(System.out);
}
};
C++:
class Example
{
private:
ostream& _myOut
public:
Example(ostream& s): _myOut(s) {}
}
main:
Example e = new Example(cout);
So how do you do it in C#?
AdministratorPosted Mar 5, 2003, 4:41 PM
AdministratorPosted Mar 4, 2003, 7:50 PM
AdministratorPosted Mar 4, 2003, 3:25 PM