NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

TraceSwitch Constructor

Initializes a new instance of the TraceSwitch class.

[Visual Basic]
Public Sub New( _
   ByVal displayName As String, _
   ByVal description As String _
)
[C#]
public TraceSwitch(
   string displayName,
   string description
);
[C++]
public: TraceSwitch(
   String* displayName,
   String* description
);
[JScript]
public function TraceSwitch(
   displayName : String,
   description : String
);

Parameters

displayName
A name to display on a user interface.
description
A description of the switch.

Remarks

When a TraceSwitch is instantiated, the displayName is used to find initial switch settings in the registry or in environmental variables. If the constructor cannot find initial settings, the Level is set to Off. To specify the TraceLevel, call the Level property with one of the TraceLevel enumeration values.

The level also can be set by an external setting file.

See Also

TraceSwitch Class | TraceSwitch Members | System.Diagnostics Namespace | TraceSwitch | TraceLevel | Switch | Debug | Trace