Home All Groups Group Topic Archive Search About

Usage of TraceSwitch.Description

Author
17 Feb 2006 4:30 PM
Laser Lu
Hi,
can anyone tell me what's the usage of Description of TraceSwitch?

[C#]
public TraceSwitch(
   string displayName,
   string description
);

Do we essentially need to specify the description string in the constructor of class System.Diagnostics.TraceSwitch, since the description will not be printed on the Output window and also not be captured by TraceListeners?

The following statement is to create an instance of class TraceSwitch:

arithmeticSwitch = new TraceSwitch("Arithmetic","Arithmetic Operations");


If we just need the description string here to indicate the function of trace switch, we could add some comment here instead of passing a string parameter.

arithmeticSwitch = new TraceSwitch("Arithmetic"); // Switch for Tracing Arithmetic Operations



Maybe I need to have a better understanding of the purpose that property Description was defined for class TraceSwitch, anyone please point it out for me:) Thanks!

AddThis Social Bookmark Button