TextWriterTraceListener Constructor (Stream)
Initializes a new instance of the TextWriterTraceListener class, using the stream as the recipient of the debugging and tracing output.
Assembly: System (in System.dll)
The following code example creates a TextWriterTraceListener using the constructor and adds it to the TraceListenerCollection. The example then writes two messages to this TextWriterTraceListener, and writes a message to all TraceListener objects in the TraceListenerCollection. Finally, it flushes and closes the TextWriterTraceListener.
Available since 1.1