The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
TextWriterTraceListener Constructor (String^)
.NET Framework (current version)
Initializes a new instance of the TextWriterTraceListener class, using the file as the recipient of the debugging and tracing output.
Assembly: System (in System.dll)
Parameters
- fileName
-
Type:
System::String^
The name of the file the TextWriterTraceListener writes to.
| Exception | Condition |
|---|---|
| ArgumentNullException | The file is null. |
The following code example creates a TextWriterTraceListener using the TextWriterTraceListener(String^) constructor, then adds it to the TraceListenerCollection. The example writes two messages to this TextWriterTraceListener, then writes a message to all TraceListener objects in the TraceListenerCollection. Finally, it flushes and closes the TextWriterTraceListener.
.NET Framework
Available since 1.1
Available since 1.1
Show: