TraceListenerCollection::Add Method (TraceListener^)
.NET Framework (current version)
Adds a TraceListener to the list.
Assembly: System (in System.dll)
Parameters
- listener
-
Type:
System.Diagnostics::TraceListener^
A TraceListener to add to the list.
The following example creates a TextWriterTraceListener that outputs to the console screen. The code then adds the new listener to the Trace::Listeners.
.NET Framework
Available since 1.1
Available since 1.1
Show: