2 // System.Diagnostics.BooleanSwitch.cs
5 // John R. Hicks (angryjohn69@nc.rr.com)
6 // Jonathan Pryor (jonpryor@vt.edu)
11 namespace System.Diagnostics
14 /// Provides a simple on/off switch that controls debugging
15 /// and tracing output
17 public class BooleanSwitch : Switch
20 /// Initializes a new instance
22 public BooleanSwitch(string displayName, string description)
23 : base(displayName, description)
28 /// Specifies whether the switch is enabled or disabled
31 // On .NET, any non-zero value is true. Only 0 is false.
32 get {return SwitchSetting != 0;}
34 SwitchSetting = Convert.ToInt32(value);