July 2003
Intermediate to advanced
736 pages
16h 35m
English
Trace and Debug text has to go somewhere. We already know that by default Write and WriteLine information is displayed in the Output window. The Output window and other such recipients of Trace and Debug information are referred to as trace listeners.
It is clearly possible that some internal mechanism writes to the Output window directly, but this isn't exactly what happens. Both the Trace and Debug classes have a Listeners property that is a collection. Trace and Debug share the same underlying Listeners collection, so adding a listener to one class—for example, Trace.Listeners—effectively adds a listener to the other. There are four possible kinds of listeners: DefaultTraceListener (which is comprised of the ...
Read now
Unlock full access