O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

BooleanSwitch

Synopsis

This class provides a simple on/off switch for debugging and tracing. Consult Enabled to check if the switch has been set. You can configure a boolean switch using the application configuration file (see Switch). To use a BooleanSwitch, you must enable tracing or debugging at compilation time.

public class BooleanSwitch : Switch {
// Public Constructors
   public method BooleanSwitch(string displayName, string description);  
// Public Instance Properties
   public field bool Enabled{set; get; } 
}

Hierarchy

System.Object→Switch→BooleanSwitch

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required